Skip to content

Add support for @functools.singledispatch#8934

Merged
charliermarsh merged 1 commit intomainfrom
charlie/singledispatch
Dec 1, 2023
Merged

Add support for @functools.singledispatch#8934
charliermarsh merged 1 commit intomainfrom
charlie/singledispatch

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
@charliermarsh charliermarsh deleted the charlie/singledispatch branch December 1, 2023 03:04
@github-actions
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