Skip to content

Commit

Permalink
update pre-commit hooks (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
andersy005 authored Feb 9, 2023
1 parent 4566a5b commit 15604f1
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 58 deletions.
35 changes: 9 additions & 26 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -15,35 +15,18 @@ repos:
- id: debug-statements
- id: mixed-line-ending

- repo: https://github.com/asottile/pyupgrade
rev: v2.34.0
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.244'
hooks:
- id: pyupgrade
args:
- '--py38-plus'
- id: ruff
args: ['--fix']

- repo: https://github.com/psf/black
rev: 22.6.0
- repo: https://github.com/keewis/blackdoc
rev: v0.3.8
hooks:
- id: black
- id: black-jupyter

- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8

- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
- id: blackdoc

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
rev: v3.0.0-alpha.4
hooks:
- id: prettier
language_version: system
63 changes: 61 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,67 @@
[tool.black]
line-length = 100
target-version = ['py38']
target-version = ['py39']
skip-string-normalization = true


[build-system]
requires = ["setuptools>=30.3.0", "wheel", "setuptools_scm"]
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]


[tool.ruff]
line-length = 100
target-version = "py39"
builtins = ["ellipsis"]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
per-file-ignores = {}
# E402: module level import not at top of file
# E501: line too long - let black worry about that
# E731: do not assign a lambda expression, use a def
ignore = [
"E402",
"E501",
"E731",
]
select = [
# Pyflakes
"F",
# Pycodestyle
"E",
"W",
# isort
"I",
# Pyupgrade
"UP",
]


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

[tool.ruff.isort]
known-first-party = ["ndpyramid"]

[tool.pytest.ini_options]
console_output_style = "count"
addopts = "--cov=./ --cov-report=xml --verbose"
30 changes: 0 additions & 30 deletions setup.cfg

This file was deleted.

0 comments on commit 15604f1

Please sign in to comment.