Skip to content

Commit

Permalink
Ruff: Add PLR02 and fix PLR0202
Browse files Browse the repository at this point in the history
  • Loading branch information
kiblik committed Feb 6, 2025
1 parent fbfd803 commit 7b879dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions dojo/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,10 @@ def render(self, name, value, attrs=None, renderer=None):

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

def id_for_label(self, id_):
@classmethod
def id_for_label(cls, id_):
return f"{id_}_month"

id_for_label = classmethod(id_for_label)

def value_from_datadict(self, data, files, name):
y = data.get(self.year_field % name)
m = data.get(self.month_field % name)
Expand Down
2 changes: 1 addition & 1 deletion ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ select = [
"PGH",
"PLC01", "PLC0205", "PLC0208", "PLC0414", "PLC18", "PLC24", "PLC3",
"PLE",
"PLR01", "PLR0203", "PLR0206", "PLR0915", "PLR1716", "PLR172", "PLR1733", "PLR1736",
"PLR01", "PLR02", "PLR0915", "PLR1716", "PLR172", "PLR1733", "PLR1736",
"PLW0108", "PLW0120", "PLW0127", "PLW0129", "PLW013", "PLW017", "PLW02", "PLW04", "PLW07", "PLW1", "PLW2", "PLW3",
"TRY003", "TRY004", "TRY2", "TRY300", "TRY401",
"FLY",
Expand Down

0 comments on commit 7b879dc

Please sign in to comment.