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
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

16 changes: 5 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
os: [ubuntu-latest, macOS-latest, windows-latest]

steps:
Expand All @@ -41,17 +41,11 @@ jobs:
python -m pip install --upgrade pip
python -m pip install --upgrade tox

- name: Lint (flake8)
run: flake8
- name: Ruff format
run: ruff format .

- name: Lint (black)
run: black --check .

- name: Lint (isort)
run: isort --check .

# - name: Lint (mypy)
# run: mypy .
- name: Ruff format
run: ruff check .

- name: Unit tests
run: |
Expand Down
24 changes: 9 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
# nice but doesn't support sphinx syntax - see https://github.com/Lucas-C/pre-commit-hooks-markup/issues/13
# - repo: https://github.com/Lucas-C/pre-commit-hooks-markup
# rev: v1.0.1
# hooks:
# - id: rst-linter
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.7
hooks:
# Run the linter.
- id: ruff-check
args: [ --fix ]
# Run the formatter.
- id: ruff-format
93 changes: 81 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "pytest-sphinx"
version = "0.6.3"
description = "Doctest plugin for pytest with support for Sphinx-specific doctest-directives"
readme = "README.rst"
requires-python = ">=3.9"
requires-python = ">=3.10"
license = { file = "LICENSE" }
keywords = ["sphinx", "pytest", "rst"]
authors = [
Expand All @@ -25,6 +25,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Operating System :: OS Independent",
"License :: OSI Approved :: BSD License",
Expand All @@ -37,10 +38,7 @@ dependencies = [

[project.optional-dependencies]
lint = [
"isort >= 5",
"flake8",
"black",
"mypy"
"ruff",
]

[project.urls]
Expand All @@ -49,13 +47,84 @@ homepage = "https://github.com/thisch/pytest-sphinx"
[project.entry-points."pytest11"]
"sphinx" = "pytest_sphinx"

[tool.isort]
profile = "black"

[tool.mypy]
strict = true
warn_unused_ignores = false # mypy#8823

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[dependency-groups]
dev = [
"sphinx>=8.1.3",
]


[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]

# Same as Black.
line-length = 88
indent-width = 4

target-version = "py310"


[tool.ruff.lint]
select = ["E", # pycodestyle
"F", # pyflakes
"PL", # pylint
"UP", # refurb
"R", # pylint-related
"D", # docstring
"PT", # pytest
"B", # bugbear
"D212", # summary of multi-line docstrings should start at first line
"D417", # undocumented-param
"I", # isort
]
ignore = [
"PLR2004", # magic value used in comparison
"PLR0911", # too many return statements
"PLR0912", # too many branches
"PLR0915", # too many statements
"D100", # missing docstring in public module
"D101", # missing docstring in public class
"D102", # missing docstring in public method
"D103", # missing docstring in public function
"D104", # missing docstring in public package
"D105", # missing docstring in magic method
"D107", # missing docstring in __init__
"D401", # imperative mood
]

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

[tool.ruff.lint.isort]
force-single-line = true
4 changes: 0 additions & 4 deletions setup.cfg

This file was deleted.

Loading