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

Fixed bug that causes a false positive overlapping overload error whe… #9516

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

erictraut
Copy link
Collaborator

…n the overload accepts a Callable[..., T] form. This addresses #9514.

…n the overload accepts a `Callable[..., T]` form. This addresses #9514.
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/typing/_builds_overloads.py:293:38 - error: Unnecessary "# pyright: ignore" rule: "reportOverlappingOverload" (reportUnnecessaryTypeIgnoreComment)
- 176 errors, 15 warnings, 183 informations 
+ 177 errors, 15 warnings, 183 informations 

scrapy (https://github.com/scrapy/scrapy)
-   /tmp/mypy_primer/projects/scrapy/scrapy/utils/defer.py:82:5 - error: Overload 2 for "mustbe_deferred" will never be used because its parameters overlap overload 1 (reportOverlappingOverload)
-   /tmp/mypy_primer/projects/scrapy/scrapy/utils/defer.py:90:5 - error: Overload 3 for "mustbe_deferred" will never be used because its parameters overlap overload 1 (reportOverlappingOverload)
- 2126 errors, 122 warnings, 0 informations 
+ 2124 errors, 122 warnings, 0 informations 

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+   /tmp/mypy_primer/projects/pandas-stubs/pandas-stubs/core/groupby/generic.pyi:214:115 - error: Unnecessary "# pyright: ignore" rule: "reportOverlappingOverload" (reportUnnecessaryTypeIgnoreComment)
- 1552 errors, 0 warnings, 0 informations 
+ 1553 errors, 0 warnings, 0 informations 

mypy (https://github.com/python/mypy)
-   /tmp/mypy_primer/projects/mypy/mypy/typeshed/stdlib/inspect.pyi:208:5 - error: Overload 1 for "isgeneratorfunction" overlaps overload 2 and returns an incompatible type (reportOverlappingOverload)
-   /tmp/mypy_primer/projects/mypy/mypy/typeshed/stdlib/inspect.pyi:214:5 - error: Overload 1 for "iscoroutinefunction" overlaps overload 3 and returns an incompatible type (reportOverlappingOverload)
-   /tmp/mypy_primer/projects/mypy/mypy/typeshed/stdlib/inspect.pyi:225:5 - error: Overload 1 for "isasyncgenfunction" overlaps overload 2 and returns an incompatible type (reportOverlappingOverload)
-   /tmp/mypy_primer/projects/mypy/mypy/typeshed/stdlib/asyncio/coroutines.pyi:19:5 - error: Overload 1 for "iscoroutinefunction" overlaps overload 3 and returns an incompatible type (reportOverlappingOverload)
- 1751 errors, 108 warnings, 0 informations 
+ 1747 errors, 108 warnings, 0 informations 

@erictraut erictraut merged commit 4042841 into main Nov 29, 2024
18 checks passed
@erictraut erictraut deleted the issue-9514 branch November 29, 2024 12:12
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