Skip to content

Commit 34f8c5c

Browse files
authored
Enable ruff's flake8-return (RET) rules and ignore RET504 (#2897)
1 parent 0a93029 commit 34f8c5c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ select = [
117117
"PGH", # pygrep-hooks
118118
"PIE", # flake8-pie
119119
"PL", # pylint
120+
"RET", # flake8-return
120121
"RSE", # flake8-raise
121122
"S", # flake8-bandit
122123
"SIM", # flake8-simplify
@@ -132,6 +133,7 @@ ignore = [
132133
"ISC001", # Single-line-implicit-string-concatenation, conflict with formatter
133134
"PD901", # Allow using the generic variable name `df` for DataFrames
134135
"PLR2004", # Allow any magic values
136+
"RET504", # Allow variable assignment and return immediately for readability
135137
"S603", # Allow method calls that initiate a subprocess without a shell
136138
"SIM117", # Allow nested `with` statements
137139
]

0 commit comments

Comments
 (0)