Skip to content

Commit 8a4a9eb

Browse files
authored
Ruff: Add PLR02 and fix PLR0202 (#11712)
1 parent 79ea71d commit 8a4a9eb

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

dojo/forms.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,10 @@ def render(self, name, value, attrs=None, renderer=None):
200200

201201
return mark_safe("\n".join(output))
202202

203-
def id_for_label(self, id_):
203+
@classmethod
204+
def id_for_label(cls, id_):
204205
return f"{id_}_month"
205206

206-
id_for_label = classmethod(id_for_label)
207-
208207
def value_from_datadict(self, data, files, name):
209208
y = data.get(self.year_field % name)
210209
m = data.get(self.month_field % name)

ruff.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ select = [
7575
"PGH",
7676
"PLC01", "PLC0205", "PLC0208", "PLC0414", "PLC18", "PLC24", "PLC3",
7777
"PLE",
78-
"PLR01", "PLR0203", "PLR0206", "PLR04", "PLR0915", "PLR1716", "PLR172", "PLR1733", "PLR1736", "PLR5", "PLR6104", "PLR6201",
78+
"PLR01", "PLR02", "PLR04", "PLR0915", "PLR1716", "PLR172", "PLR1733", "PLR1736", "PLR5", "PLR6104", "PLR6201",
7979
"PLW01", "PLW02", "PLW04", "PLW07", "PLW1", "PLW2", "PLW3",
8080
"TRY003", "TRY004", "TRY2", "TRY300", "TRY401",
8181
"FLY",

0 commit comments

Comments
 (0)