-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'astral-sh:main' into pytlint/singledispatch-method-E1519
- Loading branch information
Showing
11 changed files
with
237 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
from functools import singledispatch | ||
from functools import singledispatch, singledispatchmethod | ||
|
||
|
||
@singledispatch | ||
def convert_position(position): | ||
pass | ||
|
||
class Board: | ||
@singledispatch # [singledispatch-method] | ||
@classmethod | ||
def convert_position(cls, position): | ||
pass | ||
|
||
|
||
@singledispatch # [singledispatch-method] | ||
def get_position(self): | ||
pass | ||
|
||
@singledispatchmethod | ||
def move(self, position): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...inter/src/rules/pylint/snapshots/ruff_linter__rules__pylint__tests__PLE1519_E1519.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/pylint/mod.rs | ||
--- | ||
E1519.py:9:5: PLE1519 singledispatch decorator should not be used with methods, use singledispatchmethod instead. | ||
| | ||
8 | class Board: | ||
9 | @singledispatch # [singledispatch-method] | ||
| ^^^^^^^^^^^^^^^ PLE1519 | ||
10 | @classmethod | ||
11 | def convert_position(cls, position): | ||
| | ||
|
||
E1519.py:15:5: PLE1519 singledispatch decorator should not be used with methods, use singledispatchmethod instead. | ||
| | ||
15 | @singledispatch # [singledispatch-method] | ||
| ^^^^^^^^^^^^^^^ PLE1519 | ||
16 | def get_position(self): | ||
17 | pass | ||
| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.