MCPcopy
hub / github.com/django/django / get_main_version

Function get_main_version

django/utils/version.py:48–52  ·  view source on GitHub ↗

Return main version (X.Y[.Z]) from VERSION.

(version=None)

Source from the content-addressed store, hash-verified

46
47
48def get_main_version(version=None):
49 """Return main version (X.Y[.Z]) from VERSION."""
50 version = get_complete_version(version)
51 parts = 2 if version[2] == 0 else 3
52 return ".".join(str(x) for x in version[:parts])
53
54
55def get_complete_version(version=None):

Callers 1

get_versionFunction · 0.85

Calls 2

get_complete_versionFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected