Skip to content

Commit d194ea6

Browse files
add self to versions instance functions
1 parent 380d51c commit d194ea6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apps/versions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ class Versions:
2323
# For now, we are defaulting to v2.
2424
NOT_AN_API_VERSION = 0
2525

26-
def as_str(version: int):
26+
def as_str(self, version: int):
2727
return f'v{version}'
2828

29-
def as_int(version: int) -> int:
29+
def as_int(self, version: int) -> int:
3030
match version:
3131
case Versions.V1:
3232
return 1
@@ -37,10 +37,10 @@ def as_int(version: int) -> int:
3737
case _:
3838
raise VersionNotMatched(f"{version} is not a valid version constant")
3939

40-
def supported_versions():
40+
def supported_versions(self):
4141
return [Versions.V1, Versions.V2, Versions.V3]
4242

43-
def latest_versions():
43+
def latest_versions(self):
4444
return [Versions.V2, Versions.V3]
4545

4646

0 commit comments

Comments
 (0)