-
Notifications
You must be signed in to change notification settings - Fork 582
Expand file tree
/
Copy pathpyproject.toml
More file actions
29 lines (28 loc) · 1.4 KB
/
pyproject.toml
File metadata and controls
29 lines (28 loc) · 1.4 KB
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
# Repository-wide tooling configuration.
#
# Pinning ``src_paths`` here keeps ``isort`` output identical no matter
# whether the command is invoked from the repository root, from a
# connector subdirectory that does **not** ship its own
# ``[tool.isort]`` section, or via the pre-commit hook. Without this
# file ``isort`` resolves first-party imports relative to its current
# working directory, so the same file ends up with a different
# ordering depending on where the contributor (or CI) happens to run
# from. See OpenCTI-Platform/connectors#4798 for the original bug
# report.
#
# A handful of connectors ship their own ``pyproject.toml`` with a
# ``[tool.isort]`` section (``external-import/dragos``,
# ``external-import/proofpoint-tap``,
# ``external-import/tenable-security-center``). ``isort`` walks up the
# tree looking for the *closest* config and stops at the first
# ``[tool.isort]`` it finds, so when ``isort`` is run from inside one
# of those connector directories the connector-level section takes
# precedence over this file. Those connectors keep their existing
# self-contained config on purpose (separate ``black`` / ``ruff`` /
# ``mypy`` settings, source layouts that already produce the desired
# isort output); the repository-wide CI invocation
# ``isort --profile black --check .`` is always run from the repo
# root and therefore picks up this file.
[tool.isort]
profile = "black"
src_paths = ["."]