mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-10-01 03:53:41 +08:00
more ruff (#38377)
* lil more ruff * no exclusions! * rm nb exception * and generated * not used * c408 * random * all * unittest is fine
This commit is contained in:
+6
-13
@@ -152,33 +152,26 @@ lint.select = [
|
||||
"E", "F", "W", "PIE", "C4", "ISC", "A", "B",
|
||||
"NPY", # numpy
|
||||
"UP", # pyupgrade
|
||||
"ASYNC",
|
||||
"B904", "B905",
|
||||
"PLC0207",
|
||||
"TRY203", "TRY400", "TRY401", # try/excepts
|
||||
"RUF008", "RUF100",
|
||||
"RUF006", "RUF008", "RUF009", "RUF061", "RUF064", "RUF100", "RUF102", "RUF103", "RUF104",
|
||||
"TID251",
|
||||
"PLE", "PLR1704",
|
||||
]
|
||||
lint.ignore = [
|
||||
"E741",
|
||||
"E402",
|
||||
"C408",
|
||||
"ISC003",
|
||||
"B027",
|
||||
"B024",
|
||||
"NPY002", # new numpy random syntax is worse
|
||||
"UP045", "UP007", # these don't play nice with raylib atm
|
||||
"UP007", # this doesn't play nice with raylib atm
|
||||
]
|
||||
line-length = 160
|
||||
exclude = [
|
||||
"openpilot/cereal",
|
||||
"*.ipynb",
|
||||
"generated",
|
||||
]
|
||||
lint.flake8-implicit-str-concat.allow-multiline = false
|
||||
|
||||
[tool.ruff.lint.flake8-tidy-imports.banned-api]
|
||||
"pytest.main".msg = "pytest.main requires special handling that is easy to mess up!"
|
||||
"unittest".msg = "Use pytest"
|
||||
"time.time".msg = "Use time.monotonic"
|
||||
"time.time".msg = "Use time.monotonic" # time.time can skip due to its reference clock, you probably want a monotonic clock
|
||||
|
||||
# raylib banned APIs
|
||||
"pyray.measure_text_ex".msg = "Use openpilot.system.ui.lib.text_measure"
|
||||
|
||||
Reference in New Issue
Block a user