We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This triggers PLR0904
class Test: @overload def test_method(self, a: Literal[1]) -> None: ... @overload def test_method(self, a: Literal[2]) -> None: ... @overload def test_method(self, a: Literal[3]) -> None: ... @overload def test_method(self, a: Literal[4]) -> None: ... @overload def test_method(self, a: Literal[5]) -> None: ... @overload def test_method(self, a: Literal[6]) -> None: ... @overload def test_method(self, a: Literal[7]) -> None: ... @overload def test_method(self, a: Literal[8]) -> None: ... @overload def test_method(self, a: Literal[9]) -> None: ... @overload def test_method(self, a: Literal[10]) -> None: ... @overload def test_method(self, a: Literal[11]) -> None: ... @overload def test_method(self, a: Literal[12]) -> None: ... @overload def test_method(self, a: Literal[13]) -> None: ... @overload def test_method(self, a: Literal[14]) -> None: ... @overload def test_method(self, a: Literal[15]) -> None: ... @overload def test_method(self, a: Literal[16]) -> None: ... @overload def test_method(self, a: Literal[17]) -> None: ... @overload def test_method(self, a: Literal[18]) -> None: ... @overload def test_method(self, a: Literal[19]) -> None: ... @overload def test_method(self, a: Literal[20]) -> None: ... @overload def test_method(self, a: Literal[21]) -> None: ... def test_method(self, a: Any) -> None: ...
This rule should ignore overload impls
Using ruff 0.8.1
The text was updated successfully, but these errors were encountered:
That makes sense to me. Thank you.
Rule code:
ruff/crates/ruff_linter/src/rules/pylint/rules/too_many_public_methods.rs
Lines 103 to 107 in 14ba469
Code to test if a function is annotated with @overload
@overload
https://github.com/charliermarsh/ruff/blob/a73bebcf15e078c90cd590f0a8eb53313bbd5ea9/crates/ruff_python_semantic/src/analyze/visibility.rs#L30-L34
Sorry, something went wrong.
I'll have a go at fixing it
pylint
PLR0904
[pylint] Ignore overload in PLR0904 (#14730)
83651de
Fixes #14727 ## Summary Fixes #14727 ## Test Plan cargo test --------- Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
Matt-Ord
Successfully merging a pull request may close this issue.
This triggers PLR0904
This rule should ignore overload impls
Using ruff 0.8.1
The text was updated successfully, but these errors were encountered: