forked from mlflow/mlflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
115 lines (106 loc) · 3.44 KB
/
pyproject.toml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.ruff]
line-length = 100
target-version = "py38"
force-exclude = true
extend-include = ["*.ipynb"]
extend-exclude = [
"examples/recipes",
"mlflow/protos",
"mlflow/ml_package_versions.py",
"mlflow/server/graphql/autogenerated_graphql_schema.py",
"mlflow/server/js",
"mlflow/store/db_migrations",
"tests/protos",
]
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 88
[tool.ruff.lint]
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
select = [
"B006", # multiple-argument-default
"B015", # useless-comparison
"D209", # new-line-after-last-paragraph
"E", # error
"F", # Pyflakes
"C4", # flake8-comprehensions
"I", # isort
"PLR0402", # manual-from-import
"PT001", # pytest-fixture-incorrect-parentheses-style
"PT002", # pytest-fixture-positional-args
"PT003", # pytest-extraneous-scope-function
"PT006", # pytest-parameterize-names-wrong-type
"PT007", # pytest-parameterize-values-wrong-type
"PT009", # pytest-unittest-assertion
"PT010", # pytest-raises-without-exception
"PT011", # pytest-raises-too-broad
"PT012", # pytest-raises-with-multiple-statements
"PT013", # pytest-incorrect-pytest-import
"PT014", # pytest-duplicate-parametrize-test-cases
"PT018", # pytest-composite-assertion
"PT022", # pytest-useless-yield-fixture
"PT023", # pytest-incorrect-mark-parentheses-style
"PT026", # pytest-use-fixtures-without-parameters
"PT027", # pytest-unittest-raises-assertion
"RET504", # unnecessary-assign
"RUF010", # explicit-f-string-type-conversion
"RUF013", # implicit-optional
"RUF100", # unused-noqa
"S307", # suspicious-eval-usage
"S324", # hashlib-insecure-hash-function
"SIM101", # duplicate-isinstance-call
"SIM103", # needless-bool
"SIM108", # if-else-block-instead-of-if-exp
"SIM114", # if-with-same-arms
"SIM115", # open-file-with-context-handler
"SIM210", # if-expr-with-true-false
"SIM910", # dict-get-with-none-default
"T20", # flake8-print
"TID251", # banned-api
"TID252", # relative-improt
"TRY302", # useless-try-except
"UP004", # useless-object-inheritance
"UP008", # super-call-with-parameters
"UP011", # lru-cache-without-parameters
"UP012", # unecessary-encode-utf8
"UP015", # redundant-open-modes
"UP030", # format-literals
"UP031", # printf-string-format
"UP032", # f-string
"UP034", # extraneous-parenthesis
"W", # warning
]
ignore = [
"E402", # module-import-not-at-top-of-file
"E721", # type-comparison
"E741", # ambiguous-variable-name
"F811", # redefined-while-unused
]
[tool.ruff.lint.per-file-ignores]
"dev/*" = ["T201", "PT018"]
"examples/*" = ["T20", "RET504", "E501"]
"docs/*" = ["T20", "RET504", "E501"]
"mlflow/*" = ["PT018"]
[tool.ruff.lint.flake8-pytest-style]
mark-parentheses = false
fixture-parentheses = false
raises-require-match-for = ["*"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.isort]
forced-separate = ["tests"]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"pkg_resources".msg = "We're migrating away from pkg_resources. Please use importlib.resources or importlib.metadata instead."
[tool.clint]
exclude = [
"docs",
"examples",
"mlflow/protos",
"mlflow/ml_package_versions.py",
"mlflow/server/js",
"mlflow/store/db_migrations",
"tests/protos",
]