mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Let black and isort respect .gitignore
In order to let isort respect .gitignore, we need to specify this in the tool.isort entry, in pyproject.toml. For black, we don't need any extra tweaks. This is weird, since until a few months ago black did not respect .gitignore. Maybe something has changed in the meantime but if not, we should revert this change.
This commit is contained in:
parent
29c0181b4d
commit
7bc0129f94
2 changed files with 7 additions and 4 deletions
8
Makefile
8
Makefile
|
@ -4,19 +4,19 @@ JUNIT_FLAGS := --capture=sys -o junit_logging=all
|
|||
|
||||
.PHONY: lint-black
|
||||
lint-black: ## check python source code formatting issues, with black
|
||||
black --check --diff --exclude dev_scripts/envs --exclude $(LARGE_TEST_REPO_DIR) ./
|
||||
black --check --diff ./
|
||||
|
||||
.PHONY: lint-black-apply
|
||||
lint-black-apply: ## apply black's source code formatting suggestions
|
||||
black --exclude dev_scripts/envs --exclude $(LARGE_TEST_REPO_DIR) ./
|
||||
black ./
|
||||
|
||||
.PHONY: lint-isort
|
||||
lint-isort: ## check imports are organized, with isort
|
||||
isort --check-only --skip dev_scripts/envs --skip $(LARGE_TEST_REPO_DIR) ./
|
||||
isort --check --diff ./
|
||||
|
||||
.PHONY: lint-isort-apply
|
||||
lint-isort-apply: ## apply isort's imports organization suggestions
|
||||
isort --skip dev_scripts/envs --skip $(LARGE_TEST_REPO_DIR) ./
|
||||
isort ./
|
||||
|
||||
MYPY_ARGS := --ignore-missing-imports \
|
||||
--disallow-incomplete-defs \
|
||||
|
|
|
@ -47,6 +47,9 @@ strip-ansi = "*"
|
|||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
skip = [".gitignore"]
|
||||
# This is necessary due to https://github.com/PyCQA/isort/issues/1835
|
||||
follow_links = false
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry>=1.1.4"]
|
||||
|
|
Loading…
Reference in a new issue