-
-
Notifications
You must be signed in to change notification settings - Fork 844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add missing type hints to __init__(...) #2938
Conversation
Hi @pbelskiy! Thanks for the pull request 🙏
We prefer discussion -> issue -> pull request path rather than code-change first, but I am okay reviewing this small change. Yeah, this change makes sense, also because in some places we do not use annotation for Demo: grep -irn __init__ tests
tests/test_multipart.py:385: def __init__(self, iterator: typing.Iterator[bytes]) -> None:
tests/test_content.py:68: def __init__(self, content: bytes) -> None:
tests/client/test_async_client.py:183: def __init__(self) -> None:
tests/client/test_async_client.py:215: def __init__(self, name: str):
tests/client/test_client.py:232: def __init__(self) -> None:
tests/client/test_client.py:263: def __init__(self, name: str):
tests/client/test_auth.py:27: def __init__(self, auth_header: str = "", status_code: int = 200) -> None:
tests/client/test_auth.py:38: def __init__(
tests/client/test_auth.py:96: def __init__(self, repeat: int):
tests/client/test_auth.py:123: def __init__(self, token: str) -> None:
tests/client/test_auth.py:142: def __init__(self) -> None: |
Can you also add a changelog for this pr? |
Okay, I will add today later, thanks! |
From CHANGELOG.md Is adding few type hints are really notable? |
I think we should have a changelog, even if it's a little type change, so the user having type issues with the new release can understand what could be the reason. Other changelog that we have:
Anyway, if we are sure that there are no regression chances, we can skip the changelog for this change. |
Thanks, agree with you. So I've added info to changelog. |
Hello! Thanks for awesome package! 🔥
First of all, I though about create an issue, but this is too small fix for that, dear maintainers
should I create an Issue or Discussion for that super small fixes?
Summary
Here I did little work for fixing of missed type hints of few of init()
According to https://peps.python.org/pep-0484/
(Note that the return type of __init__ ought to be annotated with -> None.
So type checkers (mypy, pyright) will work fine after this PR.
Checklist