Skip to content
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

cleanup: fix typings for dependencies.py and external_commands.py #234

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

shubhbapna
Copy link
Collaborator

@shubhbapna shubhbapna commented Jul 24, 2024

part of #226

Fixes the following errors:

src/fromager/dependencies.py:33: error: Incompatible return value type (got "set[Requirement] | None", expected "set[Requirement]")  [return-value]
src/fromager/dependencies.py:73: error: Returning Any from function declared to return "Iterable[Requirement]"  [no-any-return]
src/fromager/dependencies.py:90: error: Incompatible return value type (got "set[Requirement] | None", expected "set[Requirement]")  [return-value]
src/fromager/dependencies.py:119: error: Returning Any from function declared to return "set[Requirement]"  [no-any-return]
src/fromager/dependencies.py:136: error: Incompatible return value type (got "set[Requirement] | None", expected "set[Requirement]")  [return-value]
src/fromager/dependencies.py:165: error: Returning Any from function declared to return "set[Requirement]"  [no-any-return]
src/fromager/dependencies.py:172: error: Argument 1 to "Wheel" has incompatible type "Path"; expected "str"  [arg-type]
src/fromager/dependencies.py:173: error: Argument 2 to "_filter_requirements" has incompatible type "Sequence[str]"; expected "Iterable[Requirement]"  [arg-type]
src/fromager/dependencies.py:207: error: Missing type parameters for generic type "dict"  [type-arg]
src/fromager/dependencies.py:222: error: Missing type parameters for generic type "dict"  [type-arg]
src/fromager/dependencies.py:239: error: Missing type parameters for generic type "dict"  [type-arg]
src/fromager/dependencies.py:243: error: Function is missing a type annotation  [no-untyped-def]
src/fromager/dependencies.py:262: error: Function is missing a return type annotation  [no-untyped-def]

src/fromager/external_commands.py:13: error: Missing type parameters for generic type "dict"  [type-arg]

fixes in dependencies.py needed fixes in external_commands.py.

Unfortunately we cannot upgrade pyproject_hooks to 1.1.0 to use their types since #226 (comment)
So the follow errors cannot be fixed:

src/fromager/dependencies.py:119: error: Returning Any from function declared to return "Iterable[str]"  [no-any-return]
src/fromager/dependencies.py:165: error: Returning Any from function declared to return "Iterable[str]"  [no-any-return]

@shubhbapna shubhbapna requested a review from tiran July 24, 2024 19:28
@mergify mergify bot merged commit 23250b6 into python-wheel-build:main Jul 25, 2024
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants