Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

guard: enable Ruff TC004 and TC005 (#5736)

Sparsh Vikas4fcfcf863e0a
diff --git a/pyproject.toml b/pyproject.toml
index 670dd73a9..44a44bb4c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -245,6 +245,8 @@ select = [
"SLOT", # flake8-slots
"T10", # flake8-debugger
"T201", # flake8-print: print in the library; see the per-file ignore below
+ "TC004", # runtime-import-in-type-checking-block
+ "TC005", # empty-type-checking-block
"TID", # flake8-tidy-imports
"TRY002", # raise-vanilla-class
"UP", # pyupgrade
@@ -279,7 +281,7 @@ select = [
# "SIM", # flake8-simplify. Partial: the SIM rules above. No: SIM300, it reads names such as `H` as constants
# "SLF", # flake8-self. No: tests check private members on purpose
# "T20", # flake8-print. Partial: T201 is enabled above for `kornia/` only
- # "TC", # flake8-type-checking. Partial: TC004 and TC005 are wanted. No: TC001-TC003, TC006
+ # "TC", # flake8-type-checking. Partial: TC004 and TC005 are enabled above. No: TC001-TC003, TC006
# "TD", # flake8-todos. No: the TODO format is not checked
# "TRY", # tryceratops. Partial: TRY002 is enabled above. No: TRY003 (as EM), TRY004 (changes exception classes)
]