| | [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 = "py310" |
| | line-length = 119 |
| |
|
| | [tool.ruff.lint] |
| | select = [ |
| | "E", |
| | "F", |
| | "I", |
| | "W", |
| | "UP", |
| | "FURB", |
| | "SIM", |
| | "C4", |
| | "RUF013", |
| | "PERF102", |
| | "PLC1802", |
| | "PLC0208", |
| | "PIE794", |
| | ] |
| | ignore = [ |
| | "E501", |
| | "E741", |
| | "SIM1", |
| | "SIM905", |
| | "UP015", |
| | "UP031", |
| | ] |
| | extend-safe-fixes = [ |
| | "UP006", |
| | ] |
| |
|
| | |
| | [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"] |
| |
|
| | [tool.ruff.format] |
| | |
| | quote-style = "double" |
| | |
| | indent-style = "space" |
| | |
| | skip-magic-trailing-comma = false |
| | |
| | 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", |
| | "is_training_test: marks tests that use the TrainingTesterMixin (deselect with '-m \"not is_training_test\"')", |
| | ] |
| | log_cli = 1 |
| | log_cli_level = "WARNING" |
| | asyncio_default_fixture_loop_scope = "function" |
| | filterwarnings = [ |
| | |
| | "ignore:Unknown config option.*asyncio_default_fixture_loop_scope", |
| | |
| | "ignore:builtin type SwigPyPacked has no __module__ attribute:DeprecationWarning", |
| | "ignore:builtin type SwigPyObject has no __module__ attribute:DeprecationWarning", |
| | "ignore:builtin type swigvarlink has no __module__ attribute:DeprecationWarning", |
| | ] |
| |
|