-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add stubs for dirhash
package
#13437
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
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks mostly good. One comment below.
stubs/dirhash/dirhash/cli.pyi
Outdated
from typing import Any | ||
|
||
def main() -> None: ... | ||
def get_kwargs(args: list[str]) -> dict[str, Any]: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ArgumentParser.parse_args()
(which get_kwargs()
ultimately calls) accepts any Sequence
.
Also, we now require all instances of Any
to be documented:
def get_kwargs(args: list[str]) -> dict[str, Any]: ... | |
def get_kwargs(args: Sequence[str]) -> dict[str, Any]: ... # value depends on the key |
(Will need import of Sequence
from collections.abc
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks! Indeed, I haven't given much thought to cli.py
annotations since it's not meant to be imported 😄
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Stub files for the dirhash package.
Some (not fundamental) annotations depend on scantree, which is also untyped; I may add stubs for it later.