-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
247 lines (228 loc) · 7.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
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
[build-system]
requires = ["poetry_core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 79
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
| foo.py # also separately exclude a file named foo.py in
# the root of the project
| /src/buglog/data/config.py
)
'''
[tool.flakehell]
format = "colored" # colored/grouped/stat/json/gitlab
show_source = true
max_line_length = 79
# mccabe
max_complexity = 6
# flake8-annotations-complexity
max_annotations_complexity = 4
no_accept_encodings = true
# flake8-expression-complexity
max_expression_complexity = 7
[tool.flakehell.plugins]
# Enable all first
dlint = ["+*"]
pyflakes = ["+*"]
# pylint = ["+*"]
pep8-naming = ["+*"]
"flake8-*" = ["+*"]
# Then disable some
flake8-bandit = ["+*",
"-S101", # Use of assert detected
"-S404", # Consider possible security implications associated with CalledProcessError module
"-S603", # Subprocess call - check for execution of untrusted input
"-S607", # Starting a process with a partial executable path
]
flake8-cognitive-complexity = ["-*"]
flake8-docstrings = ["-*"]
flake8-print = ["-*"]
mccabe = ["-*"]
[tool.flakehell.exceptions."docs/conf.py"]
"flake8-builtins" = ["+*",
"-A001", # Variable is shadowing a python builtin
]
[tool.flakehell.exceptions."**/data/config.py"]
"flake8-*" = ["-*"]
"pep8-naming" = ["-*"]
[tool.poetry]
name = "buglog"
version = "0.1.0"
description = ""
license = "MIT"
authors = ["lainiwa <kirrik96@gmail.com>"]
# maintainers
readme = "README.rst"
homepage = "https://github.com/lainiwa/buglog"
repository = "https://github.com/lainiwa/buglog"
documentation = "https://buglog.readthedocs.io"
# keywords
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Environment :: Console :: Curses",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: Implementation :: CPython",
# "Topic :: Office/Business :: ......",
"Topic :: Utilities",
"Typing :: Typed",
]
# packages
include = [
"LICENSE",
]
# exclude
[tool.poetry.dependencies]
python = ">=3.7,<3.9"
beautifulsoup4 = "*"
blessings = "*"
click = "*"
docutils = "*"
httpx = "*"
prompt_toolkit = "*"
readchar = "*"
xdg = "*"
timefhuman = { git = "https://github.com/alvinwan/timefhuman", rev = "ae31f38" }
pydantic = { version = "*", extras = ["typing_extensions"] }
# Extra: lint
dead = { optional = true, version = "*" }
dlint = { optional = true, version = "*" } # Encourage best practices + security
flake8 = { optional = true, version = "*" }
flake8-alfred = { optional = true, version = "*" } # Check for unsafe/obsolete symbols
flake8-annotations = { optional = true, version = "*" }
flake8-annotations-complexity = { optional = true, version = "*" } # Validate annotations complexity
flake8-bandit = { optional = true, version = "*" } # Check security
flake8-broken-line = { optional = true, version = "*" } # Don't break the line
flake8-bugbear = { optional = true, version = "*" } # Likely bugs and design problems
flake8-builtins = { optional = true, version = "*" } # Builtins used as variables or parameters
flake8-cognitive-complexity = { optional = true, version = "*" } # Functions' cognitive complexity
flake8-comprehensions = { optional = true, version = "*" } # Better list/set/dict comprehensions
flake8-debugger = { optional = true, version = "*" } # Check for debug statements
flake8-docstrings = { optional = true, version = "*" } # Checks provided by pep257
flake8-eradicate = { optional = true, version = "*" } # Commented out or dead code
flake8-executable = { optional = true, version = "*" } # Executable flags and shebangs
flake8-expression-complexity = { optional = true, version = "*" } # Annotations' complexity
flake8-fixme = { optional = true, version = "*" } # Check for FIXME, TODO etc notes
flake8-functions = { optional = true, version = "*" } # Function parameters (length, complexity, etc)
flake8-mutable = { optional = true, version = "*" } # Check for mutable default arguments
flake8-pep3101 = { optional = true, version = "*" } # Ceck for old string formatting
flake8-pie = { optional = true, version = "*" } # Misc. lints
flake8-print = { optional = true, version = "*" } # Print statements
flake8-string-format = { optional = true, version = "*" } # Check .format()
flake8-tidy-imports = { optional = true, version = "*" }
flakehell = { optional = true, version = "*" }
pep8-naming = { optional = true, version = "*" } # Check naming conventions
yamllint = { optional = true, version = "*" }
# Extra: fmt
autoflake = { optional = true, version = "*" }
black = { optional = true, version = "*" }
docformatter = { optional = true, version = "*" }
pyupgrade = { optional = true, version = "*" }
reorder-python-imports = { optional = true, version = "*" }
# Extra: test
codecov = { optional = true, version = "*" }
coverage = { optional = true, version = "*", extras = ["toml"] }
pytest = { optional = true, version = "*" }
pytest-cov = { optional = true, version = "*" }
pytest-mock = { optional = true, version = "*" }
# Extra: docs
sphinx = { optional = true, version = "*" }
sphinx-autodoc-typehints = { optional = true, version = "*" }
sphinx-rtd-theme = { optional = true, version = "*" }
[tool.poetry.dev-dependencies]
mypy = "*"
safety = "*"
pre-commit = "*"
ipython = "*"
toml-sort = "*"
restview = "*"
[tool.poetry.extras]
lint = [
"dead",
"dlint",
"flake8",
"flake8-alfred",
"flake8-annotations",
"flake8-annotations-complexity",
"flake8-bandit",
"flake8-broken-line",
"flake8-bugbear",
"flake8-builtins",
"flake8-cognitive-complexity",
"flake8-comprehensions",
"flake8-debugger",
"flake8-docstrings",
"flake8-eradicate",
"flake8-executable",
"flake8-expression-complexity",
"flake8-fixme",
"flake8-functions",
"flake8-mutable",
"flake8-pep3101",
"flake8-pie",
"flake8-print",
"flake8-string-format",
"flake8-tidy-imports",
"flakehell",
"pep8-naming",
"yamllint",
]
fmt = [
"autoflake",
"black",
"docformatter",
"pyupgrade",
"reorder-python-imports",
]
test = [
"codecov",
"coverage",
"pytest",
"pytest-cov",
"pytest-mock",
]
docs = [
"sphinx",
"sphinx-autodoc-typehints",
"sphinx-rtd-theme",
]
[tool.poetry.scripts]
bug = 'buglog.cli:main'
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/lainiwa/buglog/issues"
[tool.pytest.ini_options]
norecursedirs = ['docs', '.*']
addopts = '''
--doctest-modules
--verbose
--cov=buglog
--cov-report=html
'''
markers = '''
slow: marks tests as slow (deselect with '-m "not slow"')
serial
'''
[tool.coverage.paths]
source = ["src", "*/site-packages"]
[tool.coverage.run]
branch = true
source = ["buglog"]
[tool.coverage.report]
show_missing = true