Skip to content

Commit

Permalink
Use exclude in pyproject.toml with black (#6316)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmontagu authored Jun 30, 2023
1 parent aee6986 commit 492db2a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ rebuild-lockfiles: .pdm

.PHONY: format ## Auto-format python source files
format: .pdm
pdm run black --exclude 'pydantic/v1|tests/mypy/outputs' $(sources)
pdm run black $(sources)
pdm run ruff --fix $(sources)

.PHONY: lint ## Lint python source files
lint: .pdm
pdm run ruff $(sources)
pdm run black --exclude 'pydantic/v1|tests/mypy/outputs' $(sources) --check --diff
pdm run black $(sources) --check --diff

.PHONY: codespell ## Use Codespell to do spellchecking
codespell: .pre-commit
Expand Down
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ color = true
line-length = 120
target-version = ['py310']
skip-string-normalization = true
exclude = '''
(
/(
pydantic/v1
| tests/mypy/outputs
)/
)
'''

[tool.pyright]
include = ['pydantic']
Expand Down

0 comments on commit 492db2a

Please sign in to comment.