From be5bf86685863944e87ca399ff69c7904d7c375a Mon Sep 17 00:00:00 2001 From: Johannes Maron Date: Sun, 11 Oct 2026 20:20:53 +0200 Subject: [PATCH 1/4] 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 1b7f421..3a2763f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,6 +34,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 f75aabcbd775793bc1ef2ec47d3551e28bf6ffff 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:58 +0000 Subject: [PATCH 2/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 149 +++++++++++++++++++++---------------------------- 1 file changed, 64 insertions(+), 85 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c5977d2..aa8576d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,131 +1,110 @@ [build-system] -requires = ["flit-scm", "wheel"] build-backend = "flit_scm:buildapi" +requires = [ "flit-scm", "wheel" ] [project] name = "flit-gettext" +readme = "README.md" +keywords = [ "build", "flit", "gettext", "packaging", "pep518" ] +license = { file = "LICENSE" } authors = [ { name = "Johannes Maron", email = "johannes@maron.family" }, ] -readme = "README.md" -license = { file = "LICENSE" } -keywords = ["flit", "pep518", "build", "packaging", "gettext"] -dynamic = ["version", "description"] +requires-python = ">=3.14" classifiers = [ "Development Status :: 5 - Production/Stable", - "Programming Language :: Python", "Environment :: Web Environment", - "License :: OSI Approved :: BSD License", "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", - "Topic :: Software Development", - "Topic :: Software Development :: Libraries :: Python Modules", "Programming Language :: Python", - "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3.15", + "Topic :: Software Development", + "Topic :: Software Development :: Libraries :: Python Modules", ] -requires-python = ">=3.14" +dynamic = [ "description", "version" ] dependencies = [ - "flit-core>=3.12,<5.0", + "flit-core>=3.12,<5", ] - -[project.optional-dependencies] -scm = [ +optional-dependencies.scm = [ "flit-scm", ] +urls.Changelog = "https://github.com/codingjoe/flit-gettext/releases" +urls.Project-URL = "https://github.com/codingjoe/flit-gettext" [dependency-groups] dev = [ { include-group = "test" }, ] test = [ + "build", + "flit-scm", + "pip", "pytest", "pytest-cov", - "flit-scm", - "build", "wheel", - "pip", ] -[project.urls] -Project-URL = "https://github.com/codingjoe/flit-gettext" -Changelog = "https://github.com/codingjoe/flit-gettext/releases" - -[tool.flit.module] -name = "flit_gettext" - [tool.setuptools_scm] write_to = "flit_gettext/_version.py" -[tool.pytest.ini_options] -minversion = "6.0" -addopts = "--cov --tb=short -rxs" -testpaths = ["tests"] - -[tool.coverage.run] -source = ["flit_gettext"] -omit = ["flit_gettext/_version.py"] +[tool.flit] +module.name = "flit_gettext" -[tool.coverage.report] -show_missing = true +[tool.ruff] +line-length = 88 +indent-width = 4 +src = [ "flit_gettext", "tests" ] +format.preview = true +format.indent-style = "space" +format.quote-style = "double" +format.line-ending = "auto" +format.skip-magic-trailing-comma = false +lint.select = [ + "D", # pydocstyle + "E", # pycodestyle errors + "EXE", # flake8-executable + "F", # pyflakes + "I", # isort + "PGH", # pygrep-hooks + "PT", # flake8-pytest-style + "RET", # flake8-return + "S", # flake8-bandit + "SIM", # flake8-simplify + "UP", # pyupgrade + "W", # pycodestyle warnings +] +lint.ignore = [ "D1" ] +lint.per-file-ignores."*/migrations/*.py" = [ "E501" ] +lint.per-file-ignores."*/test*.py" = [ "PLR2004", "S101" ] +lint.flake8-pytest-style.fixture-parentheses = false +lint.flake8-pytest-style.mark-parentheses = false +lint.isort.combine-as-imports = true +lint.isort.force-wrap-aliases = true +lint.isort.known-first-party = [ "flit_gettext", "tests" ] +lint.isort.section-order = [ "future", "standard-library", "third-party", "first-party", "local-folder" ] +lint.isort.split-on-trailing-comma = true +lint.pydocstyle.convention = "pep257" [tool.isort] atomic = true line_length = 88 -known_first_party = "flit_gettext, tests" include_trailing_comma = true -default_section = "THIRDPARTY" combine_as_imports = true +default_section = "THIRDPARTY" +known_first_party = "flit_gettext, tests" -[tool.pydocstyle] -add_ignore = "D1" - -[tool.ruff] -src = ["flit_gettext", "tests"] -line-length = 88 -indent-width = 4 - -[tool.ruff.format] -quote-style = "double" -indent-style = "space" -skip-magic-trailing-comma = false -line-ending = "auto" -preview = true - -[tool.ruff.lint] -select = [ - "D", # pydocstyle - "E", # pycodestyle errors - "EXE", # flake8-executable - "F", # pyflakes - "I", # isort - "PGH", # pygrep-hooks - "PT", # flake8-pytest-style - "RET", # flake8-return - "S", # flake8-bandit - "SIM", # flake8-simplify - "UP", # pyupgrade - "W", # pycodestyle warnings -] - -ignore = ["D1"] - -[tool.ruff.lint.per-file-ignores] -"*/test*.py" = ["S101", "PLR2004"] -"*/migrations/*.py" = ["E501"] - -[tool.ruff.lint.flake8-pytest-style] -fixture-parentheses = false -mark-parentheses = false +[tool.pytest] +ini_options.minversion = "6.0" +ini_options.testpaths = [ "tests" ] +ini_options.addopts = "--cov --tb=short -rxs" -[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 -known-first-party = ["flit_gettext", "tests"] +[tool.coverage] +run.source = [ "flit_gettext" ] +run.omit = [ "flit_gettext/_version.py" ] +report.show_missing = true -[tool.ruff.lint.pydocstyle] -convention = "pep257" +[tool.pydocstyle] +add_ignore = "D1" From a9cdb3e909b36bc773bc939c306241d315c52430 Mon Sep 17 00:00:00 2001 From: Johannes Maron Date: Sun, 11 Oct 2026 20:24:29 +0200 Subject: [PATCH 3/4] Use long table format for pyproject-fmt - Pass --table-format long so nested tables expand to [table.subtable] --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3a2763f..6970324 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,6 +38,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: From a21587eefdcb398bb7f2e27181c1132cbb13a14f 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:24:48 +0000 Subject: [PATCH 4/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 68 ++++++++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 30 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index aa8576d..e0f41dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,9 +7,6 @@ name = "flit-gettext" readme = "README.md" keywords = [ "build", "flit", "gettext", "packaging", "pep518" ] license = { file = "LICENSE" } -authors = [ - { name = "Johannes Maron", email = "johannes@maron.family" }, -] requires-python = ">=3.14" classifiers = [ "Development Status :: 5 - Production/Stable", @@ -28,11 +25,16 @@ dynamic = [ "description", "version" ] dependencies = [ "flit-core>=3.12,<5", ] -optional-dependencies.scm = [ +[[project.authors]] +name = "Johannes Maron" +email = "johannes@maron.family" +[project.optional-dependencies] +scm = [ "flit-scm", ] -urls.Changelog = "https://github.com/codingjoe/flit-gettext/releases" -urls.Project-URL = "https://github.com/codingjoe/flit-gettext" +[project.urls] +Changelog = "https://github.com/codingjoe/flit-gettext/releases" +Project-URL = "https://github.com/codingjoe/flit-gettext" [dependency-groups] dev = [ @@ -51,18 +53,21 @@ test = [ write_to = "flit_gettext/_version.py" [tool.flit] -module.name = "flit_gettext" +[tool.flit.module] +name = "flit_gettext" [tool.ruff] line-length = 88 indent-width = 4 src = [ "flit_gettext", "tests" ] -format.preview = true -format.indent-style = "space" -format.quote-style = "double" -format.line-ending = "auto" -format.skip-magic-trailing-comma = false -lint.select = [ +[tool.ruff.format] +preview = true +indent-style = "space" +quote-style = "double" +line-ending = "auto" +skip-magic-trailing-comma = false +[tool.ruff.lint] +select = [ "D", # pydocstyle "E", # pycodestyle errors "EXE", # flake8-executable @@ -76,17 +81,17 @@ lint.select = [ "UP", # pyupgrade "W", # pycodestyle warnings ] -lint.ignore = [ "D1" ] -lint.per-file-ignores."*/migrations/*.py" = [ "E501" ] -lint.per-file-ignores."*/test*.py" = [ "PLR2004", "S101" ] -lint.flake8-pytest-style.fixture-parentheses = false -lint.flake8-pytest-style.mark-parentheses = false -lint.isort.combine-as-imports = true -lint.isort.force-wrap-aliases = true -lint.isort.known-first-party = [ "flit_gettext", "tests" ] -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 = [ "D1" ] +per-file-ignores."*/migrations/*.py" = [ "E501" ] +per-file-ignores."*/test*.py" = [ "PLR2004", "S101" ] +flake8-pytest-style.fixture-parentheses = false +flake8-pytest-style.mark-parentheses = false +isort.combine-as-imports = true +isort.force-wrap-aliases = true +isort.known-first-party = [ "flit_gettext", "tests" ] +isort.section-order = [ "future", "standard-library", "third-party", "first-party", "local-folder" ] +isort.split-on-trailing-comma = true +pydocstyle.convention = "pep257" [tool.isort] atomic = true @@ -97,14 +102,17 @@ default_section = "THIRDPARTY" known_first_party = "flit_gettext, tests" [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 = [ "flit_gettext" ] -run.omit = [ "flit_gettext/_version.py" ] -report.show_missing = true +[tool.coverage.run] +source = [ "flit_gettext" ] +omit = [ "flit_gettext/_version.py" ] +[tool.coverage.report] +show_missing = true [tool.pydocstyle] add_ignore = "D1"