diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1b7f421..6970324 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,6 +34,11 @@ 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 + args: [--table-format, long] - repo: https://github.com/google/yamlfmt rev: v0.21.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index c5977d2..e0f41dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,131 +1,118 @@ [build-system] -requires = ["flit-scm", "wheel"] build-backend = "flit_scm:buildapi" +requires = [ "flit-scm", "wheel" ] [project] name = "flit-gettext" -authors = [ - { name = "Johannes Maron", email = "johannes@maron.family" }, -] readme = "README.md" +keywords = [ "build", "flit", "gettext", "packaging", "pep518" ] 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.authors]] +name = "Johannes Maron" +email = "johannes@maron.family" [project.optional-dependencies] scm = [ "flit-scm", ] +[project.urls] +Changelog = "https://github.com/codingjoe/flit-gettext/releases" +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.coverage.report] -show_missing = true - -[tool.isort] -atomic = true -line_length = 88 -known_first_party = "flit_gettext, tests" -include_trailing_comma = true -default_section = "THIRDPARTY" -combine_as_imports = true - -[tool.pydocstyle] -add_ignore = "D1" +[tool.flit] +[tool.flit.module] +name = "flit_gettext" [tool.ruff] -src = ["flit_gettext", "tests"] line-length = 88 indent-width = 4 - +src = [ "flit_gettext", "tests" ] [tool.ruff.format] -quote-style = "double" +preview = true indent-style = "space" -skip-magic-trailing-comma = false +quote-style = "double" line-ending = "auto" -preview = true - +skip-magic-trailing-comma = false [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 + "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" ] +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" -ignore = ["D1"] - -[tool.ruff.lint.per-file-ignores] -"*/test*.py" = ["S101", "PLR2004"] -"*/migrations/*.py" = ["E501"] +[tool.isort] +atomic = true +line_length = 88 +include_trailing_comma = true +combine_as_imports = true +default_section = "THIRDPARTY" +known_first_party = "flit_gettext, tests" -[tool.ruff.lint.flake8-pytest-style] -fixture-parentheses = false -mark-parentheses = false +[tool.pytest] +[tool.pytest.ini_options] +minversion = "6.0" +testpaths = [ "tests" ] +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] +[tool.coverage.run] +source = [ "flit_gettext" ] +omit = [ "flit_gettext/_version.py" ] +[tool.coverage.report] +show_missing = true -[tool.ruff.lint.pydocstyle] -convention = "pep257" +[tool.pydocstyle] +add_ignore = "D1"