Skip to content

Commit

Permalink
config changes from SciTools#353
Browse files Browse the repository at this point in the history
  • Loading branch information
rcomer committed Nov 13, 2023
1 parent 0dba8bb commit a1e7a5f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 39 deletions.
21 changes: 7 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,15 @@ repos:
types: [file, python]
args: [--config=./pyproject.toml]

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
types: [file, python]
args: [--config=./setup.cfg]

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
types: [file, python]
args: [--filter-files]

- repo: https://github.com/aio-libs/sort-all
rev: v1.2.0
hooks:
- id: sort-all
types: [file, python]

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.260"
hooks:
- id: ruff
types: [file, python]
args: [--fix]
56 changes: 31 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,30 +46,36 @@ write_to = "cf_units/_version.py"
local_scheme = "dirty-tag"

[tool.black]
line-length = 79
target-version = ["py39", "py310", "py311"]
line-length = 88
target-version = ["py38", "py39", "py310", "py311"]
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
| _version.py
)
'''

[tool.isort]
known_first_party = "cf_units"
line_length = 79
profile = "black"
skip_gitignore = "True"
verbose = "False"
[tool.ruff]
line-length = 88
target-version = "py38"
select = [
# pyflakes
"F",
# pycodestyle
"E",
"W",
# flake8-bugbear
"B",
# flake8-comprehensions
"C4",
# isort
"I",
# pyupgrade
"UP",
]
ignore = ["B904", "F403", "F405"]

[tool.ruff.isort]
force-sort-within-sections = true
known-first-party = ["cf_units"]

[tool.ruff.mccabe]
max-complexity = 22

[tool.ruff.pydocstyle]
convention = "numpy"

0 comments on commit a1e7a5f

Please sign in to comment.