We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 380d51c commit d194ea6Copy full SHA for d194ea6
apps/versions.py
@@ -23,10 +23,10 @@ class Versions:
23
# For now, we are defaulting to v2.
24
NOT_AN_API_VERSION = 0
25
26
- def as_str(version: int):
+ def as_str(self, version: int):
27
return f'v{version}'
28
29
- def as_int(version: int) -> int:
+ def as_int(self, version: int) -> int:
30
match version:
31
case Versions.V1:
32
return 1
@@ -37,10 +37,10 @@ def as_int(version: int) -> int:
37
case _:
38
raise VersionNotMatched(f"{version} is not a valid version constant")
39
40
- def supported_versions():
+ def supported_versions(self):
41
return [Versions.V1, Versions.V2, Versions.V3]
42
43
- def latest_versions():
+ def latest_versions(self):
44
return [Versions.V2, Versions.V3]
45
46
0 commit comments