Ruff: disallow non-openpilot imports (#29841)

This commit is contained in:
Justin Newberry
2023-09-08 10:43:02 -07:00
committed by GitHub
parent c96fe132e8
commit 110cfef1c2
5 changed files with 12 additions and 6 deletions
+7 -1
View File
@@ -167,7 +167,7 @@ build-backend = "poetry.core.masonry.api"
# https://beta.ruff.rs/docs/configuration/#using-pyprojecttoml
[tool.ruff]
select = ["E", "F", "W", "PIE", "C4", "ISC", "RUF100", "A", "B"]
select = ["E", "F", "W", "PIE", "C4", "ISC", "RUF100", "A", "B", "TID251"]
ignore = ["W292", "E741", "E402", "C408", "ISC003", "B027", "B024"]
line-length = 160
target-version="py311"
@@ -180,3 +180,9 @@ exclude = [
"third_party",
]
flake8-implicit-str-concat.allow-multiline=false
[tool.ruff.flake8-tidy-imports.banned-api]
"selfdrive".msg = "Use openpilot.selfdrive"
"common".msg = "Use openpilot.common"
"system".msg = "Use openpilot.system"
"third_party".msg = "Use openpilot.third_party"
"tools".msg = "Use openpilot.tools"