Skip to content

Commit 9dfd33c

Browse files
committed
bug fix
where because of list() existing, a typehint wouldn't work as intended
1 parent 3e8c3fc commit 9dfd33c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pybpsapi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class API:
77

88
def __init__(self, url="https://bpsapi.rajtech.me/"):
99
self.url = url
10+
self.list = self.list_
1011

1112
json = requests.get(self.url + "categories").json()
1213
if json['http_status'] == 200:
@@ -38,7 +39,7 @@ def latest(self, category: str or int) -> dict | None:
3839
return json['data']
3940

4041
# /list endpoint
41-
def list(self, category: str or int, amount: int = -1) -> list | None:
42+
def list_(self, category: str or int, amount: int = -1) -> list | None:
4243
"""The `/list` endpoint returns a list of circulars from a particular category"""
4344
if type(category) == int:
4445
category = int(category)

0 commit comments

Comments
 (0)