-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathpyproject.toml
248 lines (221 loc) · 6.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
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
248
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=61"]
[project]
authors = [
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Security",
]
dependencies = [
"arrow>=1.3.0",
"black>=25.1.0",
"inflection>=0.5.1",
"isort>=6.0.0",
"jmespath>=1.0.1",
"paho-mqtt<2.0.0",
"pyaes>=1.6.1",
"pydantic<2.0.0",
"python-dateutil>=2.9.0.post0",
"pyyaml>=6.0.2",
"redis<5.0.0",
"requests>=2.32.3",
"rich>=13.9.4",
"semantic-version>=2.10.0",
"wrapt>=1.17.2",
]
description = "ThreatConnect Exchange App Framework"
dynamic = ["readme", "version"]
keywords = ["exchange", "tcex", "threatconnect"]
license = {text = "Apache-2.0"}
name = "tcex"
requires-python = ">=3.11"
[project.urls]
Documentation = "https://threatconnect.readme.io/docs/overview"
"Release Notes" = "https://threatconnect.readme.io/docs/release-notes"
Source = "https://github.com/ThreatConnect-Inc/tcex"
[dependency-groups]
dev = [
"bandit>=1.8.3",
"pre-commit>=4.1.0",
"pyright>=1.1.394",
"pyupgrade>=3.19.1",
"ruff>=0.9.7",
"typer>=0.15.1",
]
test = [
"deepdiff>=8.2.0",
"fakeredis>=2.27.0",
"pytest>=8.3.4",
"pytest-cov>=6.0.0",
"pytest-html>=4.1.1",
"pytest-ordering>=0.6",
"pytest-xdist>=3.6.1",
]
[tool.setuptools]
license-files = []
[tool.setuptools.dynamic]
readme = {file = ["README.md"], content-type = "text/markdown"}
version = {attr = "tcex.__version__"}
[tool.setuptools.packages.find]
exclude = ["tests*", "local-*"]
#
# Linters / Formatters
#
[tool.codespell]
# https://streetsidesoftware.com/vscode-spell-checker/
ignore-words-list = "ore"
skip = "*.cspell*,*.history,*local,uv.lock"
[tool.isort]
dedup_headings = false
import_heading_firstparty = "first-party"
import_heading_stdlib = "standard library"
import_heading_thirdparty = "third-party"
include_trailing_comma = true
known_first_party = ""
known_local_folder = "."
known_third_party = ""
line_length = 100
profile = "black"
[tool.pyright]
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md#sample-pyprojecttoml-file
exclude = [
"**/.history",
"**/__pycache__",
"**/local-*",
"tcex/api/tc/v2",
"tests",
]
pythonPlatform = "Linux"
pythonVersion = "3.11"
reportIncompatibleMethodOverride = false
reportIncompatibleVariableOverride = false
reportPrivateImportUsage = false
[tool.pytest.ini_options]
filterwarnings = []
junit_family = "xunit2"
testpaths = [
"tests",
]
[tool.ruff]
# https://docs.astral.sh/ruff/
# exclude additional directories, outside of .gitignore.
exclude = [
"tests",
]
# set line length to match black
line-length = 100
# set the python target
target-version = "py311"
[tool.ruff.format]
# https://docs.astral.sh/ruff/formatter/
docstring-code-format = true
docstring-code-line-length = 60
indent-style = "space"
line-ending = "auto"
quote-style = "single"
skip-magic-trailing-comma = false
[tool.ruff.lint]
# https://docs.astral.sh/ruff/linter/
# control "--fix" behavior.
# fixable = []
# unfixable = []
# https://beta.ruff.rs/docs/configuration/#error-suppression
ignore = [
"B008", # Do not perform function call ... in argument defaults; instead, perform ...
"B011", # do not call assert False since python -O removes these calls
"BLE001", # Do not catch blind exception: ...
"C901", # ... is too complex
"D202", # no blank lines allowed after function docstring
"D203", # 1 blank line required before class docstring (found 0)
"D213", # Multi-line docstring summary should start at the second line
"D400", # First line should end with a period ...
"D406", # Section name should end with a newline ...
"D407", # Missing dashed underline after section ...
"D413", # Missing blank line after last section ...
"D415", # First line should end with a period, question mark, or exclamation point ...
"E402", # module level import not at top of file
"FBT001", # Boolean-typed positional argument in function definition
"FBT002", # Boolean default positional argument in function definition
"G004", # Logging statement uses f-string
"N818", # Exception name ... should be named with an Error suffix
"PGH003", # Use specific rule codes when ignoring type issues
"PLR0912", # Too many branches
"PLR0913", # Too many arguments in function definition
"PLR0915", # Too many statements
"PT006", # Wrong name(s) type in ..., expected ...
"TC001", # Move application import ... into a type-checking block
"TID252", # Prefer absolute imports over relative imports from parent modules
]
# control enabled plugins
select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C", # flake8-comprehensions
"C4", # flake8-comprehensions
"C90", # mccabe
"D", # pydocstyle
"DJ", # flake8-django
"DTZ", # flake8-datetimez
"E", # pycodestyle
"W", # pycodestyle
"E", # pycodestyle
"EM", # flake8-errmsg
"EXE", # flake8-executable
"F", # Pyflakes
"FBT", # flake8-boolean-trap
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"NPY", # NumPy-specific
"PD", # pandas-vet
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # Pylint
"PLC", # Convention
"PLE", # Error
"PLR", # Refactor
"PLW", # Warning
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"SLF", # flake8-self
"T10", # flake8-debugger
"T20", # flake8-print
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle
"YTT", # flake8-2020
]
# Other Options
# "ANN", # flake8-annotations
# "COM", # flake8-commas
# "ERA", # eradicate
# "S", # flake8-bandit
# "Q", # flake8-quotes
[tool.ruff.lint.extend-per-file-ignores]
"__init__.py" = ["F401"]
[tool.ruff.lint.pydocstyle]
# https://docs.astral.sh/ruff/linter/
convention = "google"