-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
69 lines (56 loc) · 1.98 KB
/
pyproject.toml
File metadata and controls
69 lines (56 loc) · 1.98 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
[tool.pytest.ini_options]
addopts = ["-vvv", "-n", "2", "--log-level", "WARNING", "--color", "yes"]
filterwarnings = ['ignore:AnsibleCollectionFinder has already been configured']
testpaths = ["tests"]
[tool.ruff]
# Same as Black.
line-length = 88
indent-width = 4
# Assume Python 3.7+.
target-version = "py37"
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"N", # pep8-naming
"S", # flake8-bandit
"T20", # flake8-print
"SIM", # flake8-simplify
"LOG", # flake8-logging
"RUF", # Ruff-specific rules
]
ignore = [
"E501", # Line too long, handled by formatter
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
[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"
# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
docstring-code-format = true
# Set the line length limit used when formatting code snippets in
# docstrings.
docstring-code-line-length = "dynamic"
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "S106", "S107"] # Allow assert and hardcoded passwords in tests
"__init__.py" = ["F401"] # Allow unused imports in __init__.py files
"plugins/modules/*" = ["E402"] # Allow Module level import not at top of file in modules
[tool.ruff.lint.isort]
known-first-party = ["ansible_collections.devil_imps.devil"]
force-single-line = true