treefmt/ruff: remove EM rules as they cause unnecessary work with no real upside
As discussed in the F2 matrix channel, not being able to put the error message inside of the thrown exception just results in one assigning an additional variable to immediatly throw it. The original reason for these rules to exist are that the message isn't printed twice, though the line above the thrown exception is printed anyways in the stacktrace, so we still get the error message twice but now with additional work. Hence this commit removes the said rules Change-Id: I0b37c0b0861334703a5772c36353d31441f19dcd
This commit is contained in:
+2
-2
@@ -66,7 +66,7 @@ task-tags = ["TODO", "FIXME", "XXX"]
|
||||
# disabled: ANN4: no any type; not enabled as we support anys in multiple places
|
||||
# A: builtin shadowing
|
||||
# C4: list and generator comprehensions
|
||||
# EM: don't pass strings directly into exceptions, but use a variable; avoids duplicate printing of the message
|
||||
# disabled: EM: don't pass strings directly into exceptions, but use a variable; avoids duplicate printing of the message
|
||||
# ISC: implicit string concatination
|
||||
# INP: require __init__.py in all packages
|
||||
# LOG: creation of logger objects
|
||||
@@ -143,7 +143,7 @@ task-tags = ["TODO", "FIXME", "XXX"]
|
||||
# PGH: things about pygrep, we don't use
|
||||
# FURB: covered by other rule sets
|
||||
# TRY: try and raise related things, not helpful as we only do testing
|
||||
select = ["E4", "E7", "E9", "F", "ERA", "ASYNC", "ANN0", "ANN2", "A", "C4", "EM", "ISC", "INP", "LOG", "G", "PIE", "T20", "PT", "Q", "RSE", "RET", "SIM", "TID251", "TD", "ARG", "PTH", "N", "PERF", "PLC", "PLE", "UP", "RUF"]
|
||||
select = ["E4", "E7", "E9", "F", "ERA", "ASYNC", "ANN0", "ANN2", "A", "C4", "ISC", "INP", "LOG", "G", "PIE", "T20", "PT", "Q", "RSE", "RET", "SIM", "TID251", "TD", "ARG", "PTH", "N", "PERF", "PLC", "PLE", "UP", "RUF"]
|
||||
ignore = ["ANN002", "ANN003", "TD001", "TD003", "PLE1", "RUF005"]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
|
||||
Reference in New Issue
Block a user