Files
wehub-resource-sync caf324b09d
tests / check_code_quality (push) Waiting to run
tests / tests (ubuntu-latest, 3.10) (push) Blocked by required conditions
tests / tests (ubuntu-latest, 3.11) (push) Blocked by required conditions
Build documentation / build (push) Waiting to run
Deploy "method_comparison" Gradio to Spaces / deploy (push) Waiting to run
Deploy "PEFT shop" Gradio app to Spaces / deploy (push) Waiting to run
tests on transformers main / tests (push) Waiting to run
tests / tests (ubuntu-latest, 3.12) (push) Blocked by required conditions
tests / tests (ubuntu-latest, 3.13) (push) Blocked by required conditions
tests / tests (windows-latest, 3.10) (push) Blocked by required conditions
tests / tests (windows-latest, 3.11) (push) Blocked by required conditions
tests / tests (windows-latest, 3.12) (push) Blocked by required conditions
tests / tests (windows-latest, 3.13) (push) Blocked by required conditions
Secret Leaks / trufflehog (push) Waiting to run
CI security linting / zizmor latest via Cargo (push) Waiting to run
chore: import upstream snapshot with attribution
2026-07-13 13:24:42 +08:00

69 lines
2.2 KiB
TOML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[tool.black]
# Only used by `hf-doc-builder´.
line-length = 119
target-version = ['py310']
[tool.ruff]
target-version = "py310"
line-length = 119
extend-exclude = ["*.ipynb"]
required-version = "~=0.15.12"
[tool.ruff.lint]
preview = true
explicit-preview-rules = true
extend-select = [
"C", # Complexity
"E", # PEP8 errors
"F", # PEP8 formatting
"I", # Import sorting
"UP", # Pyupgrade upgrades
"W", # PEP8 warnings
"PT009", # Pytest assertions
"RUF022", # Sorting of __all__
"RUF068", # Duplicates in __all__
]
ignore = [
"C901", # Function too complex
"E501", # Line length (handled by ruff-format)
"F841", # unused variable
"UP007", # X | Y style Unions
"C420", # dict.fromkeys
"UP045", # don't force replacing Optional[X] with X | None
"SIM118", # `for key in dct.keys()` is allowed
"PLC0206", # allow iterating over dict keys and pulling values later, can be more consistent
"RUF012", # allow mutable default values, contrary to popular belief, not always evil
"B018", # a "useless expression" is not useless when it tests for an AttributeError
"SIM117", # allow nesting of `with` statements: can be *more* readable of they are long
"BLE001", # allow catching bare `Exception`
"SIM102", # collapse multiple `if` statements: nice to have but requires too many changes
"PYI041", # considers type annotations like int|float as redundant and wants float only, but type can carry semantic meaning (e.g. total number vs fraction)
]
[tool.ruff.lint.isort]
lines-after-imports = 2
known-first-party = ["peft"]
[tool.pytest]
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"ELLIPSIS",
"NUMBER",
]
addopts = ["--cov=src/peft", "--cov-report=term-missing", "--durations=10"]
markers = [
"single_gpu_tests: tests that run on a single GPU",
"multi_gpu_tests: tests that run on multiple GPUs",
"regression: whether to run regression suite test",
"bitsandbytes: select bitsandbytes integration tests",
]
filterwarnings = [
"error::DeprecationWarning:transformers",
# in sync with tests/conftest.py regarding BPE deprecation
"ignore:.*BPE.__init__ will not create from files anymore.*:DeprecationWarning:transformers",
"error::FutureWarning:transformers",
]