From 26ac2393097b2052b922966539255ee59887d0f6 Mon Sep 17 00:00:00 2001 From: Johannes Maron Date: Sun, 11 Oct 2026 20:21:16 +0200 Subject: [PATCH 1/3] Add pyproject-fmt - Add the pyproject-fmt pre-commit hook to format pyproject.toml --- .pre-commit-config.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7a59521..6bdad69 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -45,6 +45,10 @@ repos: - id: ruff-check args: [--fix, --exit-non-zero-on-fix] - id: ruff-format + - repo: https://github.com/tox-dev/pyproject-fmt + rev: v2.30.1 + hooks: + - id: pyproject-fmt - repo: https://github.com/google/yamlfmt rev: v0.21.0 hooks: From 5ad89ce782a1b135ef7a6ecb40350e9bd9db4545 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 11 Oct 2026 18:21:38 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .pre-commit-config.yaml | 1 + pyproject.toml | 92 +++++++++++++++++------------------------ 2 files changed, 38 insertions(+), 55 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6bdad69..2fd4301 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,6 +49,7 @@ repos: rev: v2.30.1 hooks: - id: pyproject-fmt + args: [--table-format, long] - repo: https://github.com/google/yamlfmt rev: v0.21.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index f4661f9..c4ff6ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,23 +1,22 @@ [build-system] -requires = ["flit_core>=3.12.0", "flit_scm", "wheel"] build-backend = "flit_scm:buildapi" +requires = [ "flit-core>=3.12", "flit-scm", "wheel" ] [project] name = "relint" +readme = "README.md" +keywords = [ "linter", "regex" ] +license = { file = "LICENSE" } authors = [ { name = "Johannes Maron", email = "johannes@maron.family" }, ] -readme = "README.md" -license = { file = "LICENSE" } -keywords = ["regex", "linter"] -dynamic = ["version", "description"] +requires-python = ">=3.14" classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", - "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3.15", @@ -25,16 +24,15 @@ classifiers = [ "Topic :: Software Development :: Quality Assurance", "Topic :: Software Development :: Testing", ] -requires-python = ">=3.14" +dynamic = [ "description", "version" ] dependencies = [ - "PyYAML", + "pyyaml", "rich", ] - -[project.optional-dependencies] -regex = [ - "regex" -] +optional-dependencies.regex = [ "regex" ] +urls.Changelog = "https://github.com/codingjoe/relint/releases" +urls.Project-URL = "https://github.com/codingjoe/relint" +scripts.relint = "relint.__main__:main" [dependency-groups] dev = [ @@ -46,53 +44,37 @@ test = [ "pytest-mock", ] -[project.scripts] -relint = "relint.__main__:main" - -[project.urls] -Project-URL = "https://github.com/codingjoe/relint" -Changelog = "https://github.com/codingjoe/relint/releases" - -[tool.flit.module] -name = "relint" - [tool.setuptools_scm] write_to = "relint/_version.py" -[tool.pytest.ini_options] -minversion = "6.0" -addopts = "--cov --tb=short -rxs" -testpaths = ["tests"] - -[tool.coverage.run] -source = ["relint"] - -[tool.coverage.report] -show_missing = true +[tool.flit] +module.name = "relint" [tool.ruff] -src = ["relint", "tests"] - -[tool.ruff.lint] -select = [ - "E", # pycodestyle errors - "W", # pycodestyle warnings - "F", # pyflakes - "I", # isort - "S", # flake8-bandit - "D", # pydocstyle - "UP", # pyupgrade - "B", # flake8-bugbear - "C", # flake8-comprehensions +src = [ "relint", "tests" ] +lint.select = [ + "B", # flake8-bugbear + "C", # flake8-comprehensions + "D", # pydocstyle + "E", # pycodestyle errors + "F", # pyflakes + "I", # isort + "S", # flake8-bandit + "UP", # pyupgrade + "W", # pycodestyle warnings ] +lint.ignore = [ "B904", "D1", "E501", "S101" ] +lint.isort.combine-as-imports = true +lint.isort.force-wrap-aliases = true +lint.isort.section-order = [ "future", "standard-library", "third-party", "first-party", "local-folder" ] +lint.isort.split-on-trailing-comma = true +lint.pydocstyle.convention = "pep257" -ignore = ["B904", "D1", "E501", "S101"] - -[tool.ruff.lint.isort] -combine-as-imports = true -split-on-trailing-comma = true -section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"] -force-wrap-aliases = true +[tool.pytest] +ini_options.minversion = "6.0" +ini_options.testpaths = [ "tests" ] +ini_options.addopts = "--cov --tb=short -rxs" -[tool.ruff.lint.pydocstyle] -convention = "pep257" +[tool.coverage] +run.source = [ "relint" ] +report.show_missing = true From ce2990ece6b5e727b1a927ab43e7c1cdcadbceae Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 11 Oct 2026 18:26:21 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 48 ++++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c4ff6ef..66b712b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,9 +7,6 @@ name = "relint" readme = "README.md" keywords = [ "linter", "regex" ] license = { file = "LICENSE" } -authors = [ - { name = "Johannes Maron", email = "johannes@maron.family" }, -] requires-python = ">=3.14" classifiers = [ "Development Status :: 5 - Production/Stable", @@ -29,10 +26,16 @@ dependencies = [ "pyyaml", "rich", ] -optional-dependencies.regex = [ "regex" ] -urls.Changelog = "https://github.com/codingjoe/relint/releases" -urls.Project-URL = "https://github.com/codingjoe/relint" -scripts.relint = "relint.__main__:main" +[[project.authors]] +name = "Johannes Maron" +email = "johannes@maron.family" +[project.optional-dependencies] +regex = [ "regex" ] +[project.urls] +Changelog = "https://github.com/codingjoe/relint/releases" +Project-URL = "https://github.com/codingjoe/relint" +[project.scripts] +relint = "relint.__main__:main" [dependency-groups] dev = [ @@ -48,11 +51,13 @@ test = [ write_to = "relint/_version.py" [tool.flit] -module.name = "relint" +[tool.flit.module] +name = "relint" [tool.ruff] src = [ "relint", "tests" ] -lint.select = [ +[tool.ruff.lint] +select = [ "B", # flake8-bugbear "C", # flake8-comprehensions "D", # pydocstyle @@ -63,18 +68,21 @@ lint.select = [ "UP", # pyupgrade "W", # pycodestyle warnings ] -lint.ignore = [ "B904", "D1", "E501", "S101" ] -lint.isort.combine-as-imports = true -lint.isort.force-wrap-aliases = true -lint.isort.section-order = [ "future", "standard-library", "third-party", "first-party", "local-folder" ] -lint.isort.split-on-trailing-comma = true -lint.pydocstyle.convention = "pep257" +ignore = [ "B904", "D1", "E501", "S101" ] +isort.combine-as-imports = true +isort.force-wrap-aliases = true +isort.section-order = [ "future", "standard-library", "third-party", "first-party", "local-folder" ] +isort.split-on-trailing-comma = true +pydocstyle.convention = "pep257" [tool.pytest] -ini_options.minversion = "6.0" -ini_options.testpaths = [ "tests" ] -ini_options.addopts = "--cov --tb=short -rxs" +[tool.pytest.ini_options] +minversion = "6.0" +testpaths = [ "tests" ] +addopts = "--cov --tb=short -rxs" [tool.coverage] -run.source = [ "relint" ] -report.show_missing = true +[tool.coverage.run] +source = [ "relint" ] +[tool.coverage.report] +show_missing = true