diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0e4d074845..7a387ac257 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -87,3 +87,8 @@ repos: - pytest - tomli - types-chardet + - repo: https://github.com/ComPWA/mirrors-taplo + rev: "v0.9.3" + hooks: + - id: taplo-format + entry: env RUST_LOG=warn taplo fmt --option indent_string=' ' diff --git a/pyproject.toml b/pyproject.toml index 1c5f6c103a..f746b1a720 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,10 +5,8 @@ name = "codespell" description = "Fix common misspellings in text files" readme = { file = "README.rst", content-type = "text/x-rst" } requires-python = ">=3.8" -license = {text = "GPL-2.0-only"} -authors = [ - {name = "Lucas De Marchi", email = "lucas.de.marchi@gmail.com"}, -] +license = { text = "GPL-2.0-only" } +authors = [{ name = "Lucas De Marchi", email = "lucas.de.marchi@gmail.com" }] classifiers = [ "Intended Audience :: Developers", "License :: OSI Approved", @@ -41,21 +39,11 @@ dev = [ "Pygments", "ruff", "tomli", - "twine" -] -hard-encoding-detection = [ - "chardet" -] -toml = [ - "tomli; python_version < '3.11'" -] -types = [ - "chardet>=5.1.0", - "mypy", - "pytest", - "pytest-cov", - "pytest-dependency", + "twine", ] +hard-encoding-detection = ["chardet"] +toml = ["tomli; python_version < '3.11'"] +types = ["chardet>=5.1.0", "mypy", "pytest", "pytest-cov", "pytest-dependency"] [project.scripts] codespell = "codespell_lib:_script_main" @@ -72,10 +60,7 @@ requires = ["setuptools>=64", "setuptools_scm[toml]>=6.2, != 8.0.0"] write_to = "codespell_lib/_version.py" [tool.setuptools.packages.find] -exclude = [ - "dist", - "snap", -] +exclude = ["dist", "snap"] [tool.setuptools.package-data] codespell_lib = [ @@ -102,7 +87,15 @@ minversion = "6" testpaths = ["codespell_lib/tests"] log_cli_level = "INFO" xfail_strict = true -addopts = ["--cov=codespell_lib", "-rs", "--strict-config", "--strict-markers", "--cov-report=", "--tb=short", "--junit-xml=junit-results.xml"] +addopts = [ + "--cov=codespell_lib", + "-rs", + "--strict-config", + "--strict-markers", + "--cov-report=", + "--tb=short", + "--junit-xml=junit-results.xml", +] filterwarnings = ["error"] [tool.ruff] @@ -167,7 +160,7 @@ max-complexity = 45 "codespell_lib/tests/test_basic.py" = ["ANN401", "N802"] [tool.ruff.lint.pylint] -allow-magic-value-types = ["bytes", "int", "str",] +allow-magic-value-types = ["bytes", "int", "str"] max-args = 13 max-branches = 48 max-returns = 12