forked from loonghao/webhook_bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
166 lines (147 loc) · 3.4 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
[tool.poetry]
name = "webhook-bridge"
version = "0.2.0"
description = "Bridge Webhook into your tool or internal integration."
authors = ["hallong <[email protected]>"]
license = "MIT"
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.8"
markdown = "^3.7"
fastapi-versioning = "^0.10.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.commitizen]
name = "cz_conventional_commits"
version = "0.2.0"
tag_format = "v$version"
version_files = [
"pyproject.toml:version",
"webhook_bridge/__version__.py"
]
[tool.black]
line-length = 120
target-version = ['py36', 'py37', 'py38', 'py39']
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.nox
| \.venv
| _build
| buck-out
| build
| datatalk/_vendor
| dist
)/
| foo.py # also separately exclude a file named foo.py in
# the root of the project
)
'''
[tool.isort]
profile = "black"
atomic = true
include_trailing_comma = true
lines_after_imports = 2
lines_between_types = 1
use_parentheses = true
src_paths = ["datatalk", "tests"]
filter_files = true
known_first_party = "datatalk"
# Enforce import section headers.
import_heading_future = "Import future modules"
import_heading_stdlib = "Import built-in modules"
import_heading_thirdparty = "Import third-party modules"
import_heading_firstparty = "Import local modules"
force_sort_within_sections = true
force_single_line = true
# All project unrelated unknown imports belong to third-party.
default_section = "THIRDPARTY"
skip_glob = []
# https://beta.ruff.rs/docs/configuration/
[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
"dev",
"noxfile.py",
]
line-length = 120
[tool.ruff.lint]
fixable = ["ALL"]
extend-select = [
"Q",
"RUF100",
"C90",
"UP",
"I",
"D",
"DTZ005", # https://docs.astral.sh/ruff/rules/call-datetime-now-without-tzinfo/
] # add "T" to disallow prints
flake8-quotes = { inline-quotes = "double", multiline-quotes = "double" }
ignore = [
"I001",
"D107", # ignore missing docstring in __init__ methods
"D100", # ignore missing docstring in module
"D101",
"D102",
"D103", # ignore missing docstring in public class
"D104", # ignore missing docstring in public package
"D105", # ignore missing docstring in magic methods
"C901", # ignore too complex functions, doesn't seem to be worth it
"UP032",
"UP004",
"UP025",
]
[tool.ruff.lint.mccabe]
max-complexity = 45
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["D"]
"docs/*.py" = ["D"]
"dev/*.py" = ["D"]
[tool.ruff.format]
docstring-code-format = true
quote-style = "double"
[tool.mypy]
files = "webhook_bridge"
ignore_missing_imports = true
implicit_optional = true
strict = true
disallow_untyped_calls = true
disallow_untyped_defs = true
warn_return_any = true
exclude = "tests/.*"
[tool.autoflake]
check = true