Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ jobs:
run: |
uv tool run --with=tox-uv --with=tox-gh tox --colored=yes

lint:
name: 'Lint'
runs-on: 'ubuntu-24.04'
steps:
- name: 'Checkout'
uses: 'actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0' # v7.0.0
with:
persist-credentials: 'false'

- name: 'Run linters'
uses: 'j178/prek-action@e98a699c41eb69ab013a45817a0406469a748f8d' # v2.0.5

security:
name: 'Security'
runs-on: 'ubuntu-slim'
Expand Down
82 changes: 82 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
default_language_version:
python: "python3.14"

exclude: "tests/sgml_input\\.html"

repos:
- repo: "meta"
hooks:
- id: "check-hooks-apply"
- id: "check-useless-excludes"

- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: "3e8a8703264a2f4a69428a0aa4dcb512790b2c8c" # frozen: v6.0.0
hooks:
- id: "check-added-large-files"
- id: "check-merge-conflict"
- id: "check-yaml"
- id: "end-of-file-fixer"
- id: "mixed-line-ending"
args:
- "--fix=lf"
- id: "trailing-whitespace"

- repo: "https://github.com/asottile/pyupgrade"
rev: "75992aaa40730136014f34227e0135f63fc951b4" # frozen: v3.21.2
hooks:
- id: "pyupgrade"
name: "Enforce Python 3.10+ idioms"
args: ["--py310-plus"]

- repo: "https://github.com/sirosen/slyp"
rev: "072ea633cef088f143be7c16499d1564485dfc0c" # frozen: 0.9.0
hooks:
- id: "slyp"

- repo: "https://github.com/psf/black-pre-commit-mirror"
rev: "4160603246a6b365d4a2af661c6d71b0a0f50478" # frozen: 26.5.1
hooks:
- id: "black"
args:
- "--target-version=py314"

- repo: "https://github.com/pycqa/isort"
rev: "dac090ce4d9ee313d086e2e89ab1acb8c2664fa1" # frozen: 9.0.0a3
hooks:
- id: "isort"

- repo: "https://github.com/pycqa/flake8"
rev: "c48217e1fc006c2dddd14df54e83b67da15de5cd" # frozen: 7.3.0
hooks:
- id: "flake8"
additional_dependencies:
- "flake8-toml-config==1.0.0"
- "flake8-bugbear==25.11.29"

- repo: "https://github.com/editorconfig-checker/editorconfig-checker"
rev: "6fa6539948897d1dceee75b6680d7e9688b5c9e9" # frozen: v3.8.0
hooks:
- id: "editorconfig-checker"

- repo: "https://github.com/python-jsonschema/check-jsonschema"
rev: "6b63472e72e1a91ed8a2f6d483790dfb644fa1d3" # frozen: 0.37.4
hooks:
- id: "check-dependabot"
- id: "check-readthedocs"

- repo: "https://github.com/rhysd/actionlint"
rev: "914e7df21a07ef503a81201c76d2b11c789d3fca" # frozen: v1.7.12
hooks:
- id: "actionlint"
additional_dependencies:
- "github.com/wasilibs/go-shellcheck/cmd/shellcheck@v0.11.1"

- repo: "https://github.com/kurtmckee/pre-commit-hooks"
rev: "44b638c826f1acd2ba2c5995db3156be60c5efea" # frozen: v1.0.0
hooks:
- id: "verify-consistent-pyproject-toml-python-requirements"

- repo: "https://github.com/zizmorcore/zizmor-pre-commit"
rev: "e3eebf65325ccc992422292cb7a4baee967cf815" # frozen: v1.26.1
hooks:
- id: "zizmor"
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# ---------------------

# The suffix of source filenames.
source_suffix = {'.rst': 'restructuredtext'}
source_suffix = {".rst": "restructuredtext"}

# The main toctree document.
master_doc = "index"
Expand Down
1 change: 0 additions & 1 deletion docs/copyright.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ Copyright © 1991-1995 Stichting Mathematisch Centrum. All rights reserved.
-------

See :doc:`license` for complete license and permissions information.

18 changes: 17 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,23 @@ skip_covered = true
fail_under = 75


# flake8
# ------

[tool.flake8]
max-line-length = 80
extend-select = ["B950"]
extend-ignore = ["E203", "E501", "E701"]


# isort
# -----

[tool.isort]
profile = "black"
force_single_line = true


# pytest
# ------

Expand All @@ -59,4 +76,3 @@ filterwarnings = [
"error",
]
strict = true

Loading