-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
151 lines (139 loc) · 5.18 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
[project]
name = "peppyproject"
description = "create a PEP621-compliant `pyproject.toml` file from existing build configuration"
requires-python = ">=3.9"
authors = [
{ name = "Zach Burnett" },
]
classifiers = [
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"ini2toml[full]",
"tomli>=2",
"tomli-w>=1",
"typepigeon>=2.0.1",
"typer",
]
dynamic = [
"version",
]
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.license]
file = "LICENSE"
content-type = "text/plain"
[project.urls]
repository = "https://github.com/zacharyburnett/peppyproject"
[project.scripts]
peppyproject = "peppyproject.__main__:app"
[project.optional-dependencies]
test = [
"pytest",
"tomli",
]
[build-system]
requires = [
"setuptools >=61",
"setuptools_scm[toml] >=3.4",
"wheel",
]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
[tool.ruff]
line-length = 127
extend-select = [
'F', # Pyflakes (part of default flake8)
'W', 'E', # pycodestyle (part of default flake8)
'I', # isort (import sorting)
# 'N', # pep8-naming
'D', # pydocstyle (docstring style guide)
'UP', # pyupgrade (upgrade code to modern python)
'YTT', # flake8-2020 (system version info)
#'ANN', # flake8-annotations (best practices for type annotations)
'S', # flake8-bandit (security checks)
#'BLE', # flake8-blind-except (prevent blind except statements)
'B', # flake8-bugbear (prevent common gotcha bugs)
'A', # flake8-builtins (prevent shadowing of builtins)
'C4', # flake8-comprehensions (best practices for comprehensions)
'T10', # flake8-debugger (prevent debugger statements in code)
'EM', # flake8-errormessages (best practices for error messages)
'FA', # flake8-future-annotations (correct usage future annotations)
'ISC', # flake8-implicit-str-concat (prevent implicit string concat)
'ICN', # flake8-import-conventions (enforce import conventions)
'G', # flake8-logging-format (best practices for logging)
'INP', # flake8-no-pep420 (prevent use of PEP420, i.e. implicit name spaces)
'PIE', # flake8-pie (misc suggested improvement linting)
# 'T20', # flake8-print (prevent print statements in code)
'PT', # flake8-pytest-style (best practices for pytest)
'Q', # flake8-quotes (best practices for quotes)
'RSE', # flake8-raise (best practices for raising exceptions)
'RET', # flake8-return (best practices for return statements)
#'SLF', # flake8-self (prevent private member access)
'SLOT', # flake8-slots (require __slots__ for immutable classes)
#'SIM', # flake8-simplify (suggest simplifications to code where possible)
'TID', # flake8-tidy-imports (prevent banned api and best import practices)
'TCH', # flake8-type-checking (move type checking imports into type checking blocks)
'INT', # flake8-gettext (when to use printf style strings)
# 'ARG', # flake8-unused-arguments (prevent unused arguments)
'PTH', # flake8-use-pathlib (prefer pathlib over os.path)
# 'ERA', # eradicate (remove commented out code)
'PGH', # pygrep (simple grep checks)
'PL', # pylint (general linting, flake8 alternative)
'TRY', # tryceratops (linting for try/except blocks)
'FLY', # flynt (f-string conversion where possible)
'NPY', # NumPy-specific checks (recommendations from NumPy)
'PERF', # Perflint (performance linting)
'LOG',
'RUF', # ruff specific checks
]
ignore = [
'PERF203', # `try`-`except` within a loop incurs performance overhead
'B008',
'B028',
'PLW2901', # `for` loop variable overwritten by assignment target
'PTH123', # use `Path.open()` instead of `open()`
'ISC001', # interferes with formatter
'PLR0912', # Too many branches
'PLR0913', # Too many arguments
'PLR0915', # Too many statements
'PLR2004', # Magic value used in comparison
'E722', # Do not use bare `except`
'S101', # use of `assert` detected
'INP001', # part of an implicit namespace package. Add an `__init__.py`.
'RUF012', # mutable class variable
# Pydocstyle (to fix over time
'D100', # Undocumented public module
'D101', # Undocumented public class
'D102', # Undocumented public method
'D103', # Undocumented public function
'D104', # Undocumented public package
'D105', # Undocumented magic function
'D107', # Missing docstring in `__init__`
'D205', # 1 blank line required between summary line and description
'D401', # First line of docstring should be in imperative mood
'D404', # First word of docstring should not be This
]
extend-exclude = [
"build",
"docs",
"dist",
".eggs",
".tox",
"venv",
"tests/data",
]
[tool.coverage.run]
branch = true
source = [
"peppyproject",
]
[tool.coverage.report]
show_missing = true