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

Add support for @functools.singledispatch #8934

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

charliermarsh
Copy link
Member

Summary

When a function uses @functools.singledispatch, we need to treat the first argument of any implementations as runtime-required.

Closes #6849.

@charliermarsh charliermarsh added the bug Something isn't working label Dec 1, 2023
@charliermarsh charliermarsh changed the title Add support for @functools.singledispatch Add support for @functools.singledispatch Dec 1, 2023
@charliermarsh charliermarsh force-pushed the charlie/singledispatch branch 5 times, most recently from 5af2906 to 1a4c324 Compare December 1, 2023 02:59
@charliermarsh charliermarsh enabled auto-merge (squash) December 1, 2023 03:03
@charliermarsh charliermarsh merged commit 912c39c into main Dec 1, 2023
16 checks passed
@charliermarsh charliermarsh deleted the charlie/singledispatch branch December 1, 2023 03:04
Copy link
Contributor

github-actions bot commented Dec 1, 2023

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

charliermarsh pushed a commit that referenced this pull request Mar 18, 2024
)

## Summary

Implement `singledispatchmethod-function` from pylint, part of #970.

This is essentially a copy paste of #8934 for `@singledispatchmethod`
decorator.

## Test Plan

Text fixture added.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TCH002 false positive with singledispatch
1 participant