forked from cookiecutter/cookiecutter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
130 lines (112 loc) · 3.54 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
[tool.pytest.ini_options]
testpaths = "tests"
addopts = "-vvv --cov-report term-missing --cov=cookiecutter"
[tool.doc8]
# TODO: Remove current max-line-length ignore in follow-up and adopt black limit.
# max-line-length = 88
ignore = ["D001"]
[tool.ruff]
target-version = "py37"
[tool.ruff.lint]
select = [
# "A", # flake8-builtins
# "ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"B", # flake8-bugbear
# "BLE", # flake8-blind-except
"C4", # flake8-comprehensions
# "C90", # cognitive complexity
# "COM", # flake8-commas
# "D", # pydocstyle
"DTZ", # flake8-datetimez
"E", # pycodestyle errors
# "EM", # flake8-errmsg
# "ERA", # flake8-eradicate
"EXE", # flake8-executable
"F", # pyflakes
"FA", # flake8-future-annotations
# "FBT", # boolean trap
"FLY", # flynt
# "FURB", # refurb
# "G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INT", # flake8-gettext
"ISC", # implicit-str-concat
"LOG", # flake8-logging
"N", # pep8-naming
"PERF", # perflint
"PGH", # pygrep-hooks
# "PIE", # flake8-pie
# "PL", # pylint
# "PT", # flake8-pytest-style
# "PTH", # flake8-use-pathlib
# "PYI", # flake8-pyi
# "Q", # flake8-quotes
# "RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific lints
"S", # flake8-bandit
"SIM", # flake8-simplify
# "SLF", # flake8-self
"SLOT", # flake8-slots
# "T20", # flake8-print
"TCH", # flake8-type-checking
"TID252", # ban relative imports
# "TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle warnings
# "YTT", # flake8-2020
]
# pydocstyle.convention = "google"
ignore = [
"ANN101", # missing type annotation for 'self' in method
"ANN102", # missing type annotation for 'cls' in method
"B028", # No explicit `stacklevel` keyword argument found
"COM812", # ignore when using ruff-format
"G004", # Logging statement uses f-string
"ISC001", # ignore when using ruff-format
"N818", # Exception name should be named with an Error suffix
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"S404", # `subprocess` module is possibly insecure
]
exclude = ["tests/**/hooks/*"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"D104", # Missing docstring in public package
"D200", # One-line docstring should fit on one line with quotes
"S101", # use of assert
"S603", # `subprocess` call: check for execution of untrusted input"
"S106", # Possible hardcoded password assigned to argument: "password"
"S108", # Probable insecure usage of temporary file or directory: "/tmp"
]
"cookiecutter/*" = [
"S603", # `subprocess` call: check for execution of untrusted input"
]
"docs/conf.py" = ["A001", "D100"]
[tool.ruff.format]
quote-style = "preserve"
exclude = ["tests/hooks-abort-render/hooks/*"]
[tool.mypy]
strict = true
show_error_codes = true
files = ["cookiecutter", "tests"]
exclude = "(?x)(/hooks/ | tests/test-output-folder/)"
no_implicit_reexport = true
[[tool.mypy.overrides]]
module = [
"cookiecutter.prompt",
]
ignore_errors = true
[[tool.mypy.overrides]]
module = [
"tests.*",
]
disable_error_code = ["no-untyped-def"]
[tool.coverage.report]
exclude_also = ["if TYPE_CHECKING:"]
[tool.coverage.run]
omit = [
"cookiecutter/__main__.py",
]