Skip to content

Commit

Permalink
ruff: enable PT (pytest) rules
Browse files Browse the repository at this point in the history
  • Loading branch information
karlicoss committed Aug 28, 2024
1 parent 9fd4227 commit ac08af7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ lint.extend-select = [
"RET", # early returns
"PIE", # 'misc' lints
"PLW", # pylint warnings
"PT", # pytest stuff
# "FA", # TODO enable later after we make sure cachew works?
# "PTH", # pathlib migration -- TODO enable later
# "ARG", # TODO useful, but results in some false positives in pytest fixtures... maybe later
# "A", # TODO builtin shadowing -- handle later
# "S", # bandit (security checks) -- tends to be not very useful, lots of nitpicks
# "DTZ", # datetimes checks -- complaining about missing tz and mostly false positives
# "EM", # TODO hmm could be helpful to prevent duplicate err msg in traceback.. but kinda annoying
# "FIX", # complains about fixmes/todos -- annoying
# "TD", # complains about todo formatting -- too annoying
# "ALL",
]

lint.ignore = [
Expand Down Expand Up @@ -88,4 +93,8 @@ lint.ignore = [

"PLW0603", # global variable update.. we usually know why we are doing this
"PLW2901", # for loop variable overwritten, usually this is intentional

"PT004", # deprecated rule, will be removed later
"PT011", # pytest raises should is too broad
"PT012", # pytest raises should contain a single statement
]

0 comments on commit ac08af7

Please sign in to comment.