Skip to content

Commit

Permalink
aio.api.github: Add explicit __init__ (#155)
Browse files Browse the repository at this point in the history
this works around a mypy bug that was not recognizing the args/kwargs

Signed-off-by: Ryan Northey <ryan@synca.io>
  • Loading branch information
phlax authored Jan 4, 2022
1 parent 2e7807b commit 5ddcb34
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pypi: https://pypi.org/project/abstracts

#### [aio.api.github](aio.api.github)

version: 0.0.1
version: 0.0.2

pypi: https://pypi.org/project/aio.api.github

Expand Down
2 changes: 1 addition & 1 deletion aio.api.github/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.1
0.0.2
3 changes: 3 additions & 0 deletions aio.api.github/aio/api/github/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ class GithubTag:
@abstracts.implementer(AGithubAPI)
class GithubAPI:

def __init__(self, *args, **kwargs) -> None:
AGithubAPI.__init__(self, *args, **kwargs)

@property
def api_class(self) -> Type[gidgethub.abc.GitHubAPI]:
return super().api_class
Expand Down
2 changes: 1 addition & 1 deletion aio.api.github/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_api_constructor(patches):
assert isinstance(api, github.AGithubAPI)
assert (
list(m_super.call_args)
== [args, kwargs])
== [(api, ) + args, kwargs])
assert api.commit_class == github.GithubCommit
assert api.issue_class == github.GithubIssue
assert api.issues_class == github.GithubIssues
Expand Down

0 comments on commit 5ddcb34

Please sign in to comment.