.pre-commit-config.yaml: cleanup moving Python configuration to pyproject.toml

This commit is contained in:
Aminda Suomalainen 2024-07-12 10:04:00 +03:00
parent d9cd123551
commit 95b7e82f86
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
2 changed files with 22 additions and 24 deletions

View File

@ -36,7 +36,7 @@ repos:
- id: check-docstring-first
- id: check-json
- id: check-merge-conflict
#- id: check-toml
- id: check-toml
#- id: check-xml
- id: debug-statements
- id: mixed-line-ending
@ -44,7 +44,6 @@ repos:
args: [--fix=no]
- id: pretty-format-json
args: [--autofix, --no-ensure-ascii]
#- id: requirements-txt-fixer
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config
rev: v1.6.1
hooks:
@ -59,19 +58,12 @@ repos:
rev: "v1.10.1"
hooks:
- id: mypy
args: [--ignore-missing-imports]
additional_dependencies: [types-tabulate]
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
hooks:
- id: pyupgrade
args:
[--py310-plus]
# - repo: https://github.com/asottile/reorder-python-imports
# rev: v3.12.0
# hooks:
#- id: reorder-python-imports
#args: [--py310-plus]
args: [--py310-plus]
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
hooks:
@ -81,21 +73,17 @@ repos:
rev: 24.4.2
hooks:
- id: black
#Refer to pyproject.toml
#args: ["--line-length", "79", "--target-version", "py310"]
#- id: black-jupyter
# - repo: https://github.com/scop/pre-commit-shfmt
# rev: v3.8.0-1
# hooks:
# - id: shfmt
#- id: shfmt-docker
- repo: local
hooks:
- id: pylint
name: pylint
# Use as many jobs as CPU cores, disable TODO warnings
entry: pylint -j 0 -d W0511
entry: pylint
language: system
types_or: [python, pyi]
- id: pnpm-install-dev

View File

@ -1,22 +1,32 @@
# When changing this file, read also .pre-commit-config.yaml
# Black
[tool.black]
line-length = 79
target-version = ['py310']
preview = true
# Mypy
[tool.mypy]
#python-executable = 'pypy3'
python_version = '3.10'
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html
# Pylint
[tool.pylint.main]
py-version = "3.10"
jobs = 0
[tool.pylint.basic]
include-naming-hint = true
[tool.pylint.format]
max-line-length = 79
# Not actually used here, see .pre-commit-config.yaml for reorder-python-imports
# that does the same thing.
#[tool.isort]
#profile = "black"
[tool.pylint."messages control"]
# Disables warnings about TODO
disable = ["W0511"]
# copy-pasted comments end.
#[tool.pylint.variables]
#ignored-argument-names = "_.*|^ignored_|^unused_"
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html
[tool.isort]
profile = "black"