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

Remove RET506 rule #1059

Merged
merged 2 commits into from
Jan 22, 2025
Merged
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
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ b086108f04296e2a23c6943fb81cc5d158923cfd
874f3d712c1ab776491a00b4f87db904fd4e4bce
# migrated to ruff
8980ca2546e01d1dda90aeff9e18630fe10903e6
# remove ret506 ruff rule
6b3959ee3476ffb197c2fc1bf318c32cd20db6e4
2 changes: 1 addition & 1 deletion isic/studies/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self, *args, **kwargs):
# this is a hack because passing a per-question version of recent diagnoses is
# unreasonably difficult.
raise ValueError("Only one diagnosis question is allowed per study.")
elif num_diagnosis_questions == 1: # noqa: RET506
elif num_diagnosis_questions == 1:
# the study and user are necessary for diagnosis questions in order to compute
# the recently used diagnoses
self.study = kwargs.pop("study")
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ ignore = [

# Excessive
"RET503", # implict return
"RET506", # else after raise
"PLR2004", # magic value used in comparison

# Try to fix upstream
Expand Down
Loading