-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
169 lines (151 loc) · 4.36 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=61.2",
"wheel",
]
[tool.black]
line-length = 79
target-version = ['py39']
[tool.coverage.report]
exclude_lines = [
"if TYPE_CHECKING", # Disable type-checking imports
"@(abc\\.)?abstract", # Ignore abstract methods
]
include = ["src/*"]
[tool.coverage.run]
branch = false
omit = ["*tests*", "*examples*"]
[tool.coverage.html]
directory = "dist/coverage"
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [".git", "build", "dist"]
line-length = 79
# Assume Python 3.9
target-version = "py39"
# Enable
select = [
"E", # Pycodestyle Error
"F", # Pyflakes
"W", # Pycodestyle Warning
"C90", # mccabe
"I", # isort
"D", # Pydocstyle
"YTT", # flake8-2020
"ANN", # flake8-annotations
"S", # flake8-bandit
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"PT", # flake8-pytest-style
"RET", # flake8-return
"SIM", # flake8-simplify
"PLC", # pylint
"PLE", # pylint
"PLR", # pylint
"PLW", # pylint
"PIE", # flake8-pie
"RUF", # ruff specific
]
# Always autofix, but never try to fix `F401` (unused imports).
fix = true
ignore = [
"D203",
"D212",
"D107",
"A002",
"A003",
"PLR0911",
"PLR0913",
"RUF012",
"S603",
"S607",
"PLR0912",
]
unfixable = ["F401"]
[tool.ruff.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.mccabe]
max-complexity = 13
[tool.ruff.per-file-ignores]
# Ignore `E402` (import violations) in all `__init__.py` files
"__init__.py" = ["F401", "E402"]
"tests/*.py" = [
"ANN001", # Missing type annotation for function argument {name}
"ANN002", # Missing type annotation for `*args`
"ANN101", # Missing type annotation for `{name}` in method
"ANN201", # Missing return type annotation for public function {name}
"ANN202", # Missing return type annotation for private function `{name}`
"BLE001", # Do not catch blind exception: `Exception`
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"E501", # Line too long
"S101", # Use of assert detected
"S307", # Use of possibly insecure function; consider using `ast.literal_eval`
"S603", # `subprocess` call: check for execution of untrusted input
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
"PT011", # `pytest.raises(ValueError)` is too broad, set the `match` parameter or use a more specific exception
]
[project]
authors = [{name = "Gufo Labs"}]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: BSD License",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Operating System :: OS Independent",
"Typing :: Typed",
]
dependencies = [
"PyYAML >= 6.0",
"gufo-loader >= 1.0.3",
"gufo-acme >= 0.2.0",
"jinja2 >= 3.0",
]
dynamic = ["version"]
keywords = ["NOC"]
license = {text = "BSD 3-Clause License"}
name = "gufo_thor"
requires-python = ">=3.9"
[project.readme]
content-type = "text/markdown"
file = "README.md"
[project.scripts]
gufo-thor = "gufo.thor.cli:main"
[project.urls]
"Bug Tracker" = "https://github.com/gufolabs/gufo_thor/issues"
Changelog = "https://github.com/gufolabs/gufo_thor/blob/master/CHANGELOG.md"
Documentation = "https://docs.gufolabs.com/gufo_thor/"
Homepage = "https://github.com/gufolabs/gufo_thor/"
"Source Code" = "https://github.com/gufolabs/gufo_thor/"
[tool.setuptools]
include-package-data = false
package-dir = {"" = "src"}
[tool.setuptools.packages.find]
namespaces = true
where = ["src"]
[tool.setuptools.package-data]
"gufo.thor" = ["py.typed", "samples/*", "templates/**"]
[tool.setuptools.dynamic]
version = {attr = "gufo.thor.__version__"}
[tool.mypy]
explicit_package_bases = true
mypy_path = ["src"]
strict = true
warn_unused_ignores = false