Skip to content

Commit

Permalink
Enable flake8-type-checking (TCH) to prevent regressions due to extra…
Browse files Browse the repository at this point in the history
… imports for type-checking purposes (#2388)
  • Loading branch information
Avasam authored Oct 13, 2024
1 parent 3ca02ab commit cba799b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 0 additions & 1 deletion com/win32comext/axscript/client/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from win32com.server.exception import COMException

if TYPE_CHECKING:
# Prevent circular imports
from win32comext.axscript.client.debug import DebugManager
from win32comext.axscript.client.framework import AXScriptCodeBlock, COMScript
from win32comext.axscript.server.axsite import AXSite
Expand Down
7 changes: 7 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ select = [
"UP007", # non-pep604-annotation
"UP010", # unnecessary-future-import
"UP037", # quoted-annotation

# Helps prevent circular imports and other unneeded imports
"TCH", # flake8-type-checking
]
extend-ignore = [
# No such concerns for stdlib
"TCH003", # typing-only-standard-library-import
]

[lint.per-file-ignores]
Expand Down

0 comments on commit cba799b

Please sign in to comment.