summaryrefslogtreecommitdiff
path: root/django/utils/version.py
diff options
context:
space:
mode:
authorAnton Samarchyan <anton.samarchyan@savoirfairelinux.com>2017-01-24 15:32:33 -0500
committerTim Graham <timograham@gmail.com>2017-02-11 16:11:08 -0500
commit9718fa2e8abe430c3526a9278dd976443d4ae3c6 (patch)
treecc9e2c659759bbfdb4c7785c59a909cb2655af0d /django/utils/version.py
parent98bcc5d81bca578f3a5b4d47907ba4ac40446887 (diff)
Refs #27656 -- Updated django.utils docstring verbs according to PEP 257.
Diffstat (limited to 'django/utils/version.py')
-rw-r--r--django/utils/version.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/django/utils/version.py b/django/utils/version.py
index b80d445d0c..790a68c19c 100644
--- a/django/utils/version.py
+++ b/django/utils/version.py
@@ -5,7 +5,7 @@ import subprocess
def get_version(version=None):
- "Returns a PEP 440-compliant version number from VERSION."
+ """Return a PEP 440-compliant version number from VERSION."""
version = get_complete_version(version)
# Now build the two parts of the version number:
@@ -29,15 +29,16 @@ def get_version(version=None):
def get_main_version(version=None):
- "Returns main version (X.Y[.Z]) from VERSION."
+ """Return main version (X.Y[.Z]) from VERSION."""
version = get_complete_version(version)
parts = 2 if version[2] == 0 else 3
return '.'.join(str(x) for x in version[:parts])
def get_complete_version(version=None):
- """Returns a tuple of the django version. If version argument is non-empty,
- then checks for correctness of the tuple provided.
+ """
+ Return a tuple of the django version. If version argument is non-empty,
+ check for correctness of the tuple provided.
"""
if version is None:
from django import VERSION as version
@@ -58,7 +59,7 @@ def get_docs_version(version=None):
@functools.lru_cache()
def get_git_changeset():
- """Returns a numeric identifier of the latest git changeset.
+ """Return a numeric identifier of the latest git changeset.
The result is the UTC timestamp of the changeset in YYYYMMDDHHMMSS format.
This value isn't guaranteed to be unique, but collisions are very unlikely,