Skip to content
New issue

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

Ruff: Add PLR02 and fix PLR0202 #11712

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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", "PLC24", "PLC3",
"PLE",
"PLR01", "PLR0203", "PLR0206", "PLR0915", "PLR1716", "PLR172", "PLR1733", "PLR1736",
"PLR01", "PLR02", "PLR0915", "PLR1716", "PLR172", "PLR1733", "PLR1736",
"PLW0120", "PLW0129", "PLW013", "PLW017", "PLW02", "PLW04", "PLW07", "PLW1", "PLW2", "PLW3",
"TRY003", "TRY004", "TRY2",
"FLY",
Expand Down