diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 943e740..97c578f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,11 +14,11 @@ jobs: matrix: python-version: - "pypy3.9" + - "3.14" - "3.13" - "3.12" - "3.11" - "3.10" - - "3.9" os: [ubuntu-latest] runs-on: ${{ matrix.os }} name: "${{ matrix.os }} Python: ${{ matrix.python-version }}" @@ -26,7 +26,7 @@ jobs: - name: Setup Python for tox uses: actions/setup-python@v4 with: - python-version: "3.12" + python-version: "3.13" - name: Install tox run: python -m pip install tox tox-gh-actions - uses: actions/checkout@v3 diff --git a/.github/workflows/do-lint.yml b/.github/workflows/do-lint.yml index a33baf6..4e7f9ca 100644 --- a/.github/workflows/do-lint.yml +++ b/.github/workflows/do-lint.yml @@ -15,7 +15,7 @@ jobs: - name: Setup Python for linting uses: actions/setup-python@v4 with: - python-version: "3.12" + python-version: "3.13" - name: Install tox run: python -m pip install tox tox-gh-actions - uses: actions/checkout@v3 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dc441de..b0acee1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ exclude: 'tests/' repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-merge-conflict - id: check-toml @@ -11,28 +11,28 @@ repos: - id: no-commit-to-branch - id: trailing-whitespace - repo: https://github.com/pre-commit/pre-commit - rev: v4.2.0 + rev: v4.5.1 hooks: - id: validate_manifest - repo: https://github.com/psf/black - rev: '25.1.0' + rev: '26.3.1' hooks: - id: black types_or: [python, pyi] language_version: python3 - repo: https://github.com/PyCQA/isort - rev: 6.0.1 + rev: 8.0.1 hooks: - id: isort args: [--settings-file, ./pyproject.toml] - repo: https://github.com/PyCQA/docformatter - rev: v1.7.7 + rev: ab715b8e12b601ba392e7502898e500dde10b4e8 hooks: - id: docformatter additional_dependencies: [tomli] args: [--in-place, --config, ./pyproject.toml] - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: 'v0.12.4' + rev: 'v0.15.11' hooks: - id: ruff args: [ --config, ./pyproject.toml ] @@ -43,13 +43,13 @@ repos: additional_dependencies: [toml] args: [--config, ./pyproject.toml] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.17.0 + rev: v1.20.1 hooks: - id: mypy additional_dependencies: [types-python-dateutil] args: [--config-file, ./pyproject.toml] - repo: https://github.com/myint/eradicate - rev: '3.0.0' + rev: '3.0.1' hooks: - id: eradicate args: [] diff --git a/docs/source/conf.py b/docs/source/conf.py index 0547762..92db5a4 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -7,11 +7,10 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information """Configuration file for the Sphinx documentation builder.""" - project = "docformatter" copyright = "2022-2023, Steven Myint" author = "Steven Myint" -release = "1.7.7" +release = "1.7.8" # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/pyproject.toml b/pyproject.toml index b57406f..8ed24be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "docformatter" -version = "1.7.7" +version = "1.7.8" description = "Formats docstrings to follow PEP 257" authors = ["Steven Myint"] maintainers = [ @@ -18,10 +18,11 @@ classifiers=[ 'Intended Audience :: Developers', 'Environment :: Console', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', + 'Programming Language :: Python :: 3.14', 'Programming Language :: Python :: Implementation', 'Programming Language :: Python :: Implementation :: PyPy', 'Programming Language :: Python :: Implementation :: CPython', @@ -30,7 +31,7 @@ classifiers=[ packages = [{include = "docformatter", from = "src"}] [tool.poetry.dependencies] -python = "^3.9" +python = "^3.10" charset_normalizer = "^3.0.0" tomli = {version = "^2.0.0", python = "<3.11", optional = true} @@ -142,8 +143,13 @@ output = 'coverage.xml' [tool.black] line-length = 88 -target-version = ['py39', 'py310', 'py311', 'py312', 'py313'] -include = '\.pyi?$' +target-version = [ + 'py310', + 'py311', + 'py312', + 'py313', + 'py314', +] exclude = ''' /( \.eggs @@ -221,7 +227,7 @@ exclude = [ ] line-length = 88 indent-width = 4 -target-version = "py39" +target-version = "py310" [tool.ruff.lint] select = ["E", "F", "PL"] diff --git a/src/docformatter/__init__.py b/src/docformatter/__init__.py index 1cef8d2..4b8be3c 100644 --- a/src/docformatter/__init__.py +++ b/src/docformatter/__init__.py @@ -26,7 +26,6 @@ # SOFTWARE. """This is the docformatter package.""" - __all__ = ["__version__"] # docformatter Local Imports diff --git a/src/docformatter/__main__.py b/src/docformatter/__main__.py index ce7aaea..69f71a6 100755 --- a/src/docformatter/__main__.py +++ b/src/docformatter/__main__.py @@ -26,7 +26,6 @@ # SOFTWARE. """Formats docstrings to follow PEP 257.""" - # Standard Library Imports import contextlib import signal @@ -39,8 +38,7 @@ def _help(): """Print docformatter's help.""" - print( - """\ + print("""\ usage: docformatter [-h] [-i | -c] [-d] [-r] [-e [EXCLUDE ...]] [-n [NON-CAP ...]] [-s [style]] [--rest-section-adorns REGEX] [--black] [--wrap-summaries length] @@ -108,8 +106,7 @@ def _help(): (see issue #67) (default: False) --config CONFIG path to file containing docformatter options --version show program's version number and exit -""" - ) +""") def _main(argv, standard_out, standard_error, standard_in): diff --git a/src/docformatter/__pkginfo__.py b/src/docformatter/__pkginfo__.py index a882835..3e032a3 100644 --- a/src/docformatter/__pkginfo__.py +++ b/src/docformatter/__pkginfo__.py @@ -26,5 +26,4 @@ # SOFTWARE. """Package information for docformatter.""" - -__version__ = "1.7.7" +__version__ = "1.7.8" diff --git a/src/docformatter/classify.py b/src/docformatter/classify.py index 62bcc7b..7bc5ba9 100644 --- a/src/docformatter/classify.py +++ b/src/docformatter/classify.py @@ -26,7 +26,6 @@ # SOFTWARE. """This module provides docformatter's classification functions.""" - # Standard Library Imports import re import sys diff --git a/src/docformatter/configuration.py b/src/docformatter/configuration.py index d773594..8342a1c 100644 --- a/src/docformatter/configuration.py +++ b/src/docformatter/configuration.py @@ -26,7 +26,6 @@ # SOFTWARE. """This module provides docformatter's Configurater class.""" - # Standard Library Imports import argparse import contextlib diff --git a/src/docformatter/constants.py b/src/docformatter/constants.py index c44ec6b..d95e16d 100644 --- a/src/docformatter/constants.py +++ b/src/docformatter/constants.py @@ -26,7 +26,6 @@ # SOFTWARE. """This module provides docformatter's constants.""" - # TODO: Move these constants to the configuration file and/or command line. ABBREVIATIONS = ( "e.g.", @@ -200,8 +199,9 @@ URL_SKIP_REGEX = rf"({URL_PATTERNS}):(/){{0,2}}(``|')" """The regex used to ignore found hyperlinks. -URLs that don't actually contain a domain, but only the URL pattern should -be treated like simple text. This will ignore URLs like ``http://`` or 'ftp:`. +URLs that don't actually contain a domain, but only the URL pattern should be treated +like simple text. This will ignore URLs like ``http://`` or +'ftp:`. ({URL_PATTERNS}) matches one of the URL patterns. :(/){{0,2}} matches a colon followed by up to two forward slashes. diff --git a/src/docformatter/encode.py b/src/docformatter/encode.py index c7e36f0..14c8ed9 100644 --- a/src/docformatter/encode.py +++ b/src/docformatter/encode.py @@ -26,7 +26,6 @@ # SOFTWARE. """This module provides docformatter's Encoder class.""" - # Standard Library Imports import collections import locale diff --git a/src/docformatter/patterns/__init__.py b/src/docformatter/patterns/__init__.py index b7e7a29..a3d0266 100644 --- a/src/docformatter/patterns/__init__.py +++ b/src/docformatter/patterns/__init__.py @@ -26,7 +26,6 @@ # SOFTWARE. """This is the docformatter patterns package.""" - # docformatter Local Imports from .fields import * # noqa F403 from .headers import * # noqa F403 diff --git a/src/docformatter/patterns/fields.py b/src/docformatter/patterns/fields.py index 4712e22..307ad44 100644 --- a/src/docformatter/patterns/fields.py +++ b/src/docformatter/patterns/fields.py @@ -26,7 +26,6 @@ # SOFTWARE. """This module provides docformatter's field list pattern recognition functions.""" - # Standard Library Imports import re from re import Match diff --git a/src/docformatter/patterns/headers.py b/src/docformatter/patterns/headers.py index df7f374..251e4f8 100644 --- a/src/docformatter/patterns/headers.py +++ b/src/docformatter/patterns/headers.py @@ -26,7 +26,6 @@ # SOFTWARE. """This module provides docformatter's header pattern recognition functions.""" - # Standard Library Imports import re from re import Match diff --git a/src/docformatter/patterns/misc.py b/src/docformatter/patterns/misc.py index a1577ab..5eaf987 100644 --- a/src/docformatter/patterns/misc.py +++ b/src/docformatter/patterns/misc.py @@ -26,7 +26,6 @@ # SOFTWARE. """This module provides docformatter's miscellaneous pattern recognition functions.""" - # Standard Library Imports import re import tokenize diff --git a/src/docformatter/patterns/rest.py b/src/docformatter/patterns/rest.py index ab6f018..5d38b56 100644 --- a/src/docformatter/patterns/rest.py +++ b/src/docformatter/patterns/rest.py @@ -26,7 +26,6 @@ # SOFTWARE. """This module provides docformatter's reST directive pattern recognition functions.""" - # Standard Library Imports import re diff --git a/src/docformatter/patterns/url.py b/src/docformatter/patterns/url.py index 7ad0bee..e4e6000 100644 --- a/src/docformatter/patterns/url.py +++ b/src/docformatter/patterns/url.py @@ -26,7 +26,6 @@ # SOFTWARE. """This module provides docformatter's URL pattern recognition functions.""" - # Standard Library Imports import contextlib import re diff --git a/src/docformatter/strings.py b/src/docformatter/strings.py index e5fba2e..a72e555 100644 --- a/src/docformatter/strings.py +++ b/src/docformatter/strings.py @@ -26,7 +26,6 @@ # SOFTWARE. """This module provides docformatter string manipulation functions.""" - # Standard Library Imports import contextlib import re diff --git a/src/docformatter/util.py b/src/docformatter/util.py index 008f7cf..c6886bc 100644 --- a/src/docformatter/util.py +++ b/src/docformatter/util.py @@ -26,7 +26,6 @@ # SOFTWARE. """This module provides docformatter utility functions.""" - # Standard Library Imports import os import re diff --git a/src/docformatter/wrappers/__init__.py b/src/docformatter/wrappers/__init__.py index e3cc074..dc684ea 100644 --- a/src/docformatter/wrappers/__init__.py +++ b/src/docformatter/wrappers/__init__.py @@ -26,7 +26,6 @@ # SOFTWARE. """This is the docformatter wrappers package.""" - # docformatter Local Imports from .description import * # noqa F403 from .fields import * # noqa F403 diff --git a/src/docformatter/wrappers/description.py b/src/docformatter/wrappers/description.py index 8954c73..18d8767 100644 --- a/src/docformatter/wrappers/description.py +++ b/src/docformatter/wrappers/description.py @@ -26,7 +26,6 @@ # SOFTWARE. """This module provides docformatter's description wrapper functions.""" - # Standard Library Imports import contextlib from typing import List diff --git a/src/docformatter/wrappers/fields.py b/src/docformatter/wrappers/fields.py index 00964aa..291cf6d 100644 --- a/src/docformatter/wrappers/fields.py +++ b/src/docformatter/wrappers/fields.py @@ -26,7 +26,6 @@ # SOFTWARE. """This module provides docformatter's field list wrapper functions.""" - # Standard Library Imports import re import textwrap diff --git a/src/docformatter/wrappers/summary.py b/src/docformatter/wrappers/summary.py index 46dd274..9dbef0a 100644 --- a/src/docformatter/wrappers/summary.py +++ b/src/docformatter/wrappers/summary.py @@ -26,7 +26,6 @@ # SOFTWARE. """This module provides docformatter's summary wrapper functions.""" - # Standard Library Imports import re import textwrap diff --git a/src/docformatter/wrappers/url.py b/src/docformatter/wrappers/url.py index 946a4f3..f799c0f 100644 --- a/src/docformatter/wrappers/url.py +++ b/src/docformatter/wrappers/url.py @@ -26,7 +26,6 @@ # SOFTWARE. """This module provides docformatter's URL wrapper functions.""" - # Standard Library Imports import contextlib from typing import Iterable, List, Tuple diff --git a/tox.ini b/tox.ini index a905699..19c3ab4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,10 +1,10 @@ [tox] env_list = - py39 py310 py311 py312 py313 + py314 pypy3 coverage pre-commit @@ -14,12 +14,12 @@ skipsdist = true [gh-actions] python = - 3.9: py39 3.10: py310 3.11: py311 3.12: py312 3.13: py313 - pypy-3.9: pypy3 + 3.14: py314 + pypy-3.11: pypy3 [testenv] description = Run the test suite using pytest under {basepython} @@ -71,7 +71,7 @@ commands = coverage combine coverage report -m coverage xml -o {toxworkdir}/coverage.xml -depends = py39, py310, py311, py312, py313, pypy3 +depends = py310, py311, py312, py313, py314, pypy3 [testenv:pre-commit] description = Run autoformatters and quality assurance tools under {basepython}. @@ -87,5 +87,4 @@ commands = description = build docformatter documentation allowlist_externals = make changedir = docs -commands = - make html +commands = make html