Skip to content

Commit 62a2fed

Browse files
kocabiyikclaude
andcommitted
fix(mypy): skip huggingface_hub imports to resolve Python 3.9 syntax error
huggingface_hub uses match statements (Python 3.10+). With python_version set to 3.9 in mypy config, following imports into that package caused a syntax error that blocked all type checking. Skip it via overrides since we don't need to type-check third-party code. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 276c8e8 commit 62a2fed

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/python/pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ select = [
107107

108108
[tool.mypy]
109109
python_version = "3.9"
110+
exclude = ["^\\.venv/"]
110111
warn_return_any = true
111112
warn_unused_configs = true
112113
disallow_untyped_defs = true
@@ -120,6 +121,10 @@ warn_no_return = true
120121
warn_unreachable = true
121122
strict_equality = true
122123

124+
[[tool.mypy.overrides]]
125+
module = ["huggingface_hub.*"]
126+
follow_imports = "skip"
127+
123128
[tool.pytest.ini_options]
124129
testpaths = ["tests"]
125130
python_files = ["test_*.py"]

0 commit comments

Comments
 (0)