forked from GRBurst/slack-logger-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
221 lines (193 loc) · 6.82 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
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "slack-logger-python"
description = "Slack logger utilizing python logging interface."
readme = "README.md"
requires-python = ">=3.10"
keywords = [
"slack", "python",
"logging", "logger", "log", "python-logging",
"Handler", "Formatter", "logging.Handler", "logging.Formatter",
"monitoring", "alerting",
"slack-api", "webhook", "slack-logger",
"messaging", "health-check", "notification-service", "notification",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Topic :: Communications :: Chat",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: System :: Logging",
]
dynamic = ["dependencies", "version"]
[tool.setuptools.package-data]
slack_logger = ["py.typed"]
[tool.setuptools.dynamic]
version = {file = "VERSION"}
dependencies = {file = ["requirements.in"]}
[[project.authors]]
name = "GRBurst"
email = "GRBurst@protonmail.com"
[project.urls]
"Homepage" = "https://github.com/GRBurst/slack-python-logging"
"Bug Tracker" = "https://github.com/GRBurst/slack-python-logging/issues"
[tool.black]
multi-line-output = 3
line-length = 120
target-version = ["py310"]
include = '\.pyi?$'
exclude = '''
(
/(
| \.git
| \.github
| \.venv
| \.venv-ubunix
| \.mypy_cache
)/
)
'''
[tool.isort]
profile = "black"
skip_gitignore = true
line_length = 120
[tool.ruff]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
select = [
"F", # pyflakes
"E", "W", # pycodestyle
"I", # isort
"B", # bugbears
"N", # pep8-naming
"UP", # pyupgrade (advocates modern syntax)
"YTT", # flake8-2020 (checks for misuse of sys.version or sys.version_info)
"ANN", # flake8-annotations (lightweight check for function type annotations)
"ASYNC", # flake8-async (checks for bad async / asyncio practices)
"S", # flake8-bandit (check for insecure code)
"FBT", # flake8-boolean-trap (checks for boolean trap anti-pattern)
"A", # flake8-builtins (checks for shadowed buildins)
"C4", # flake8-comprehensions (hints for better and comprehensions)
"DTZ", # flake8-datetimez (checks for unsafe naive datetime usage)
"T10", # flake8-debugger (checks for debugger calls like pdb)
"EXE", # flake8-executable (checks for permission and shebangs on executable python scripts, e.g. our jobs)
"FA", # flake8-future-annotations (advocates modern PEP 563 syntax, extends pyupgrade)
"ISC", # flake8-implicit-str-concat (checks for implicitly concatenated strings)
"G", # flake8-logging-format (use "extra" keyword dict for passing args to log message for better performance)
"INP", # flake8-no-pep420 (checks for missing __init__ file)
"PIE", # flake8-pie (based on Clippy's let_and_return and Microsoft's TSLint rule no-unnecessary-local-variable)
"T20", # flake8-print (checks for print usages)
"PT", # flake8-pytest-style (checking common style issues or inconsistencies with pytest)
"Q", # flake8-quotes (use double quotes)
"RSE", # flake8-raise (checks for unnecessary parentheses on raised exceptions)
"RET", # flake8-return (checks for unnecessary return patterns)
"SLF", # flake8-self (checks for private member access)
"SLOT", # flake8-slots (require __slots__ to be defined for subclasses of immutable types)
"SIM", # flake8-simplify (helps you simplify your code)
"TID", # flake8-tidy-imports (helps you write tidier imports)
"INT", # flake8-gettext (use lazy string evaluation)
"ARG", # flake8-unused-arguments (checks for unused function arguments)
"PTH", # flake8-use-pathlib (checks for functions that can be replaced by pathlib)
"TD", # flake8-todos (checks TODOs in the project)
"ERA", # eradicate (remove commented-out code)
"PD", # pandas-vet (provides opinionated linting for pandas)
"PL", # Pylint (use rules from pylint)
"TRY", # tryceratops (prevent exception handling anti-patterns)
"FLY", # flynt (use f-strings)
"NPY", # numpy specific rules
"PERF", # perflint (checks for performance anti-patterns)
# "FURB", # refurb (tool for refurbishing and modernizing Python codebases)
"RUF", # Ruff-specific rules
]
ignore = [
"E501", # line to long will be ignored and is handled by black
"TD003", # we don't need to add an issue to a todo
"ANN101", # skip type annotation for `self` in method
"ANN102", # skip type annotation for `cls` in method
]
output-format = "grouped"
show-fixes = true
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".venv*",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
# Same as Black.
line-length = 120
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.10.
target-version = "py310"
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.per-file-ignores]
"tests/*" = ["S101"] # allow asserts in tests
[tool.mypy]
allow_redefinition = false
check_untyped_defs = true
disallow_any_generics = true
disallow_any_unimported = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_untyped_decorators = true
ignore_missing_imports = true
no_implicit_optional = true
no_implicit_reexport = true
show_error_codes = true
strict_equality = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
pretty = true
pdb = true
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra --capture=tee-sys"
log_cli = true
testpaths = [
"tests",
]
[tool.coverage.run]
source = [
"slack_logger"
]
[tool.pip-tools]
generate-hashes = true
strip_extras = true
allow_unsafe = true
output_file = "requirements.txt"