Skip to content

Commit

Permalink
Configure pyproject-fmt for 3.13 Trove classifier
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Jul 2, 2024
1 parent 03af6b2 commit aa3a94e
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 37 deletions.
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-json
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: forbid-submodules
- id: trailing-whitespace
exclude: \.github/ISSUE_TEMPLATE\.md|\.github/PULL_REQUEST_TEMPLATE\.md

Expand All @@ -35,7 +37,6 @@ repos:
rev: 2.1.3
hooks:
- id: pyproject-fmt
additional_dependencies: [tox]

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.18
Expand Down
78 changes: 42 additions & 36 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ readme = "README.md"
keywords = [
"humanize time size",
]
license = {text = "MIT"}
maintainers = [{name = "Hugo van Kemenade"}]
authors = [{name = "Jason Moiron", email = "jmoiron@jmoiron.net"}]
license = { text = "MIT" }
maintainers = [
{ name = "Hugo van Kemenade" },
]
authors = [
{ name = "Jason Moiron", email = "jmoiron@jmoiron.net" },
]
requires-python = ">=3.8"
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -37,19 +41,17 @@ classifiers = [
dynamic = [
"version",
]
[project.optional-dependencies]
tests = [
optional-dependencies.tests = [
"freezegun",
"pytest",
"pytest-cov",
]
[project.urls]
Documentation = "https://humanize.readthedocs.io/"
Funding = "https://tidelift.com/subscription/pkg/pypi-humanize?utm_source=pypi-humanize&utm_medium=pypi"
Homepage = "https://github.com/python-humanize/humanize"
"Issue tracker" = "https://github.com/python-humanize/humanize/issues"
"Release notes" = "https://github.com/python-humanize/humanize/releases"
Source = "https://github.com/python-humanize/humanize"
urls.Documentation = "https://humanize.readthedocs.io/"
urls.Funding = "https://tidelift.com/subscription/pkg/pypi-humanize?utm_source=pypi-humanize&utm_medium=pypi"
urls.Homepage = "https://github.com/python-humanize/humanize"
urls."Issue tracker" = "https://github.com/python-humanize/humanize/issues"
urls."Release notes" = "https://github.com/python-humanize/humanize/releases"
urls.Source = "https://github.com/python-humanize/humanize"

[tool.hatch]
version.source = "vcs"
Expand All @@ -65,38 +67,42 @@ local_scheme = "no-local-version"
[tool.ruff]
fix = true

[tool.ruff.lint]
select = [
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle errors
"EM", # flake8-errmsg
"F", # pyflakes errors
"I", # isort
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"PGH", # pygrep-hooks
lint.select = [
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle errors
"EM", # flake8-errmsg
"F", # pyflakes errors
"I", # isort
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"PGH", # pygrep-hooks
"PYI", # flake8-pyi
"RUF022", # unsorted-dunder-all
"RUF100", # unused noqa (yesqa)
"UP", # pyupgrade
"W", # pycodestyle warnings
"YTT", # flake8-2020
"UP", # pyupgrade
"W", # pycodestyle warnings
"YTT", # flake8-2020
]
extend-ignore = [
lint.extend-ignore = [
"E203", # Whitespace before ':'
"E221", # Multiple spaces before operator
"E226", # Missing whitespace around arithmetic operator
"E241", # Multiple spaces after ','
]
lint.per-file-ignores."tests/*" = [
"D",
]
lint.isort.known-first-party = [
"humanize",
]
lint.isort.required-imports = [
"from __future__ import annotations",
]
pydocstyle.convention = "google"

[tool.ruff.lint.isort]
known-first-party = ["humanize"]
required-imports = ["from __future__ import annotations"]

[tool.ruff.pydocstyle]
convention = "google"

[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D"]
[tool.pyproject-fmt]
max_supported_python = "3.13"

[tool.pytest.ini_options]
addopts = "--color=yes"
Expand Down

0 comments on commit aa3a94e

Please sign in to comment.