-
Notifications
You must be signed in to change notification settings - Fork 945
Expand file tree
/
Copy pathpyproject.toml
More file actions
84 lines (74 loc) · 2.09 KB
/
pyproject.toml
File metadata and controls
84 lines (74 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
[tool.mypy]
ignore_missing_imports = true
[tool.ty]
[tool.ty.terminal]
# Do not fail CI on warnings; keep output readable
error-on-warning = false
output-format = "concise"
[tool.ty.rules]
# Minimize noise from optional/extra dependencies not installed in CI or local
unresolved-import = "ignore"
unresolved-attribute = "ignore"
# Keep type: ignore comments for mypy compatibility
unused-ignore-comment = "ignore"
unused-type-ignore-comment = "ignore"
# Be tolerant with framework/typing edge-cases and runtime-validated code paths
unsupported-base = "ignore"
unsupported-operator = "ignore"
possibly-missing-attribute = "ignore"
possibly-missing-implicit-call = "ignore"
not-subscriptable = "ignore"
call-non-callable = "ignore"
# Loosen strictness a bit on type matching
missing-argument = "ignore"
deprecated = "ignore"
[tool.ty.src]
exclude = ["src/huggingface_hub/cli/spaces.py"] # TypedDict not yet fully supported by ty
[tool.pytest.ini_options]
# Add the specified `OPTS` to the set of command line arguments as if they had
# been specified by the user.
addopts = "-Werror::FutureWarning --log-cli-level=INFO -sv --durations=0"
# The defined variables will be added to the environment before any tests are
# run, part of pytest-env plugin
env = [
"DISABLE_SYMLINKS_IN_WINDOWS_TESTS=1",
"HF_TOKEN=",
"HUGGINGFACE_CO_STAGING=1",
"HUGGING_FACE_HUB_TOKEN=",
]
[tool.ruff]
exclude = [
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".venv*",
"__pypackages__",
"_build",
"build",
"dist",
"venv",
"src/huggingface_hub/_hot_reload/sse_client.py", # Vendored
]
line-length = 119
# Ignored rules:
# "E501" -> line length violation
lint.ignore = ["E501"]
lint.select = ["E", "F", "I", "W"]
[tool.ruff.lint.isort]
known-first-party = ["huggingface_hub"]
lines-after-imports = 2
[tool.tomlsort]
all = true
in_place = true
spaces_before_inline_comment = 2 # Match Python PEP 8
spaces_indent_inline_array = 4 # Match Python PEP 8
trailing_comma_inline_array = true