/
pyproject.toml
101 lines (94 loc) · 4.25 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
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[tool.ruff]
line-length = 256
extend-include = [
"bin/*",
]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
[tool.ruff.lint]
select = [
"I", # isort
"UP", # pyupgrade
"TID", # flake8-tidy-imports
]
ignore = [
"ALL",
"UP008", # Use `super()` instead of `super(__class__, self)`
"UP015", # Unnecessary open mode parameters
"UP027", # Replace unpacked list comprehension with a generator expression
"UP028", # Replace `yield` over `for` loop with `yield from`
"UP030", # Use implicit references for positional format fields
"UP031", # Use format specifiers instead of percent format
"UP032", # Use f-string instead of `format` call
"SIM210",
]
[tool.ruff.lint.isort]
known-first-party = ["rucio"]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"typing.AbstractSet".msg = "Use `collections.abc.Set` instead."
"typing.AsyncContextManager".msg = "Use `contextlib.AbstractAsyncContextManager` instead."
"typing.AsyncGenerator".msg = "Use `collections.abc.AsyncGenerator` instead."
"typing.AsyncIterable".msg = "Use `collections.abc.AsyncIterable` instead."
"typing.AsyncIterator".msg = "Use `collections.abc.AsyncIterator` instead."
"typing.Awaitable".msg = "Use `collections.abc.Awaitable` instead."
"typing.Callable".msg = "Use `collections.abc.Callable` instead."
"typing.ChainMap".msg = "Use `collections.ChainMap` instead."
"typing.Collection".msg = "Use `collections.abc.Collection` instead."
"typing.Container".msg = "Use `collections.abc.Container` instead."
"typing.ContextManager".msg = "Use `contextlib.AbstractContextManager` instead."
"typing.Coroutine".msg = "Use `collections.abc.Coroutine` instead."
"typing.Counter".msg = "Use `collections.Counter` instead."
"typing.DefaultDict".msg = "Use `collections.defaultdict` instead."
"typing.Deque".msg = "Use `collections.deque` instead."
"typing.Dict".msg = "Use built-in type `dict` instead. (note: to annotate arguments, the abstract collection type `collections.abc.Mapping` is preferred, if possible. See: https://docs.python.org/3/library/typing.html#typing.Dict)"
"typing.FrozenSet".msg = "Use built-in type `frozenset` instead."
"typing.Generator".msg = "Use `collections.abc.Generator` instead."
"typing.ItemsView".msg = "Use `collections.abc.ItemsView` instead."
"typing.Iterable".msg = "Use `collections.abc.Iterable` instead."
"typing.Iterator".msg = "Use `collections.abc.Iterator` instead."
"typing.KeysView".msg = "Use `collections.abc.KeysView` instead."
"typing.List".msg = "Use built-in type `list` instead. (note: to annotate arguments, abstract collection types such as `collections.abc.Sequence` and `collections.abc.Iterable` are preferred, if possible. See: https://docs.python.org/3/library/typing.html#typing.List)"
"typing.Mapping".msg = "Use `collections.abc.Mapping` instead."
"typing.MappingView".msg = "Use `collections.abc.MappingView` instead."
"typing.Match".msg = "Use `re.Match` instead."
"typing.MutableMapping".msg = "Use `collections.abc.MutableMapping` instead."
"typing.MutableSequence".msg = "Use `collections.abc.MutableSequence` instead."
"typing.MutableSet".msg = "Use `collections.abc.MutableSet` instead."
"typing.OrderedDict".msg = "Use `collections.OrderedDict` instead."
"typing.Pattern".msg = "Use `re.Pattern` instead."
"typing.Reversible".msg = "Use `collections.abc.Reversible` instead."
"typing.Sequence".msg = "Use `collections.abc.Sequence` instead."
"typing.Set".msg = "Use built-in type `set` instead. (note: to annotate arguments, the abstract collection type `collections.abc.AbstractSet` is preferred, if possible. See: https://docs.python.org/3/library/typing.html#typing.Set)"
"typing.Tuple".msg = "Use built-in type `tuple` instead."
"typing.Type".msg = "Use built-in `type` instead."
"typing.ValuesView".msg = "Use `collections.abc.ValuesView` instead."