mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
use google convention for docstrings
This commit is contained in:
@ -90,12 +90,15 @@ def list_tags(s):
|
||||
yield parts[1][len(tag_prefix) :]
|
||||
|
||||
|
||||
def parse_semver(s):
|
||||
"""
|
||||
Turns a semver string into a 3-tuple or None if the parsing failed, it is a
|
||||
prerelease or it has build metadata.
|
||||
def parse_semver(s) -> tuple[int, int, int] | None:
|
||||
"""Parse a semver string.
|
||||
|
||||
See https://semver.org
|
||||
|
||||
Returns:
|
||||
A tuple, if the parsing was successful, else None.
|
||||
In the latter case, it must probably be a prerelease
|
||||
or include build metadata.
|
||||
"""
|
||||
m = semver_regex.match(s)
|
||||
|
||||
@ -106,7 +109,7 @@ def parse_semver(s):
|
||||
):
|
||||
return None
|
||||
|
||||
return (int(m.group("major")), int(m.group("minor")), int(m.group("patch")))
|
||||
return int(m.group("major")), int(m.group("minor")), int(m.group("patch"))
|
||||
|
||||
|
||||
def semver_to_s(t):
|
||||
|
@ -29,9 +29,7 @@ from django.core.management.commands import compilemessages
|
||||
|
||||
|
||||
class Command(compilemessages.Command):
|
||||
"""
|
||||
Wrap call to compilemessages to avoid building whole env
|
||||
"""
|
||||
"""Wrap call to compilemessages to avoid building whole env."""
|
||||
|
||||
help = """
|
||||
The usage is the same as the real compilemessages
|
||||
|
@ -30,9 +30,7 @@ from django.core.management.base import BaseCommand
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
"""
|
||||
Compiles scss in static folder for production
|
||||
"""
|
||||
"""Compiles scss in static folder for production."""
|
||||
|
||||
help = "Compile scss files from static folder"
|
||||
|
||||
|
Reference in New Issue
Block a user