@@ -78,11 +78,11 @@ select = [
7878ignore = [
7979 " RUF002" , # hyphen checks
8080 " RUF005" , # unpacking over concatenation (no point in that rule IMO)
81- " SIM118" , # Needed b/c iter(batch) != iter(batch.keys()). See https://github.com/thu-ml/tianshou/issues/922
8281 " SIM108" , # if - else is fine
8382 " E501" , # line too long. black does a good enough job
8483 " E741" , # variable names like "l". this isn't a huge problem
8584 " B008" , # do not perform function calls in argument defaults. we do this sometimes
85+ " B009" , # don't replace getattr with attr access
8686 " B011" , # assert false. we don't use python -O
8787 " B028" , # we don't need explicit stacklevel for warnings
8888 " D100" ,
@@ -128,7 +128,20 @@ ignore = [
128128 " F403" , " F405" , # star imports
129129 " C401" , # generators
130130 " C901" , # complexity analysis
131-
131+ " RET504" , # assignment before return can be useful for debugging
132+ " SIM103" , # forbids multiple returns
133+ " SIM110" , # requires use of any(...) instead of for-loop
134+ " G001" , # forbids str.format in log statements
135+ " E722" , # forbids unspecific except clause
136+ " SIM105" , # forbids empty/general except clause
137+ " SIM113" , # wants to enforce use of enumerate
138+ " E712" , # forbids equality comparison with True/False
139+ " UP007" , # forbids some uses of Union
140+ " TID252" , # forbids relative imports
141+ " B904" , # forces use of raise from other_exception
142+ " RUF012" , # forbids mutable attributes as ClassVar
143+ " SIM117" , # forbids nested with statements
144+ " C400" , # wants to unnecessarily force use of list comprehension
132145]
133146unfixable = [
134147 " F841" , # unused variable. ruff keeps the call, but mostly we want to get rid of it all
@@ -165,7 +178,7 @@ docstring-code-format = true
165178PYDEVD_DISABLE_FILE_VALIDATION =" 1"
166179# keep relevant parts in sync with pre-commit
167180[tool .poe .tasks ] # https://github.com/nat-n/poethepoet
168- test = " pytest test --cov={{cookiecutter.package_name}} --cov-report=xml --cov-report=term-missing --durations=0 -v --color=yes"
181+ test = " pytest tests --cov={{cookiecutter.package_name}} --cov-report=xml --cov-report=term-missing --durations=0 -v --color=yes"
169182_black_check = " black --check ."
170183_ruff_check = " ruff check ."
171184_ruff_check_nb = " nbqa ruff check docs"
0 commit comments