-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathpyproject.toml
More file actions
79 lines (65 loc) · 2.29 KB
/
pyproject.toml
File metadata and controls
79 lines (65 loc) · 2.29 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
# Modified from https://github.com/huggingface/transformers/blob/main/pyproject.toml
[tool.black]
line-length = 119
[tool.isort]
profile = "black"
line_length = 119
lines_after_imports = 2
# known_first_party = ["transformers"]
known_unsloth = ["unsloth"]
sections = ["FUTURE", "STDLIB", "UNSLOTH", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
[tool.coverage.run]
source = ["transformers"]
omit = [
"*/convert_*",
"*/__main__.py"
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise",
"except",
"register_parameter"
]
[tool.ruff]
target-version = "py39"
line-length = 119
[tool.ruff.lint]
# Never enforce `E501` (line length violations).
ignore = ["C416", "C901", "E501", "E731", "E741", "F402", "F823"]
# RUF013: Checks for the use of implicit Optional
# in type annotations when the default parameter value is None.
select = ["C", "E", "F", "I", "W", "RUF013", "UP006"]
extend-safe-fixes = ["UP006"]
# Ignore import violations in all `__init__.py` files.
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401", "F403", "F811"]
"src/transformers/file_utils.py" = ["F401"]
"src/transformers/utils/dummy_*.py" = ["F401"]
[tool.ruff.lint.isort]
lines-after-imports = 2
# known-first-party = ["transformers"]
section-order = ["future", "standard-library", "unsloth", "third-party", "first-party", "local-folder"]
[tool.ruff.lint.isort.sections]
unsloth = ["unsloth"]
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
[tool.pytest.ini_options]
addopts = "--doctest-glob='**/*.md'"
doctest_optionflags="NUMBER NORMALIZE_WHITESPACE ELLIPSIS"
markers = [
"flash_attn_3_test: marks tests related to flash attention 3 (deselect with '-m \"not flash_attn_3_test\"')",
"flash_attn_test: marks tests related to flash attention (deselect with '-m \"not flash_attn_test\"')",
"bitsandbytes: select (or deselect with `not`) bitsandbytes integration tests",
"generate: marks tests that use the GenerationTesterMixin"
]
log_cli = 1
log_cli_level = "WARNING"
asyncio_default_fixture_loop_scope = "function"