Skip to content

Simplified handling of TypeVars used in bound objects for constructor… #8119

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

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

erictraut
Copy link
Collaborator

… methods.

Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1175:20 - error: No overloads for "builds" match the provided arguments (reportCallIssue)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1177:17 - error: Argument of type "(...) -> Unknown" cannot be assigned to parameter "pos_args" of type "T@BuildsFn" in function "builds"
+     Type "(...) -> Unknown" is incompatible with type "T@BuildsFn" (reportArgumentType)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1178:25 - error: Argument of type "list[str]" cannot be assigned to parameter "exclude" of type "T@BuildsFn" in function "builds"
+     Type "list[str]" is incompatible with type "T@BuildsFn" (reportArgumentType)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1179:26 - error: Argument of type "Just[(Any) -> Any] | list[Just[(Any) -> Any]] | None" cannot be assigned to parameter "pre_call" of type "T@BuildsFn" in function "builds"
+     Type "Just[(Any) -> Any] | list[Just[(Any) -> Any]] | None" is incompatible with type "T@BuildsFn" (reportArgumentType)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1180:31 - error: Argument of type "bool" cannot be assigned to parameter "unpack_kwargs" of type "T@BuildsFn" in function "builds"
+     Type "bool" is incompatible with type "T@BuildsFn" (reportArgumentType)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1181:34 - error: Argument of type "bool" cannot be assigned to parameter "resolve_pre_call" of type "T@BuildsFn" in function "builds"
+     Type "bool" is incompatible with type "T@BuildsFn" (reportArgumentType)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1182:32 - error: Argument of type "bool" cannot be assigned to parameter "run_in_context" of type "T@BuildsFn" in function "builds"
+     Type "bool" is incompatible with type "T@BuildsFn" (reportArgumentType)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:1183:39 - error: Argument of type "((F2@__init__) -> F2@__init__) | None" cannot be assigned to parameter "instantiation_wrapper" of type "T@BuildsFn" in function "builds"
+     Type "((F2@__init__) -> F2@__init__) | None" is incompatible with type "T@BuildsFn" (reportArgumentType)
+   /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_implementations.py:3458:25 - error: Argument of type "tuple[()] | Collection[str | int] | ((str) -> bool)" cannot be assigned to parameter "zen_exclude" of type "T@BuildsFn" in function "builds"
+     Type "tuple[()] | Collection[str | int] | ((str) -> bool)" is incompatible with type "T@BuildsFn" (reportArgumentType)
- 171 errors, 15 warnings, 183 informations 
+ 180 errors, 15 warnings, 183 informations 

@erictraut erictraut merged commit 0df185e into main Jun 11, 2024
11 of 12 checks passed
@erictraut erictraut deleted the boundTypeVar branch June 11, 2024 19:50
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.

1 participant