-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use hatchling, ruff and add 3.12 support (#65)
- Loading branch information
1 parent
a5227e3
commit 2f0cb8d
Showing
13 changed files
with
175 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,74 +2,33 @@ repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-ast | ||
- id: check-builtin-literals | ||
- id: check-docstring-first | ||
- id: check-merge-conflict | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/asottile/add-trailing-comma | ||
rev: v2.4.0 | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: "v0.0.272" | ||
hooks: | ||
- id: add-trailing-comma | ||
args: [--py36-plus] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.3.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: ["--py37-plus"] | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
- repo: https://github.com/psf/black | ||
rev: 23.3.0 | ||
hooks: | ||
- id: black | ||
args: [--safe] | ||
- repo: https://github.com/asottile/blacken-docs | ||
rev: 1.13.0 | ||
hooks: | ||
- id: blacken-docs | ||
additional_dependencies: [black==23.3] | ||
- repo: https://github.com/tox-dev/tox-ini-fmt | ||
rev: "1.3.0" | ||
hooks: | ||
- id: tox-ini-fmt | ||
args: ["-p", "fix"] | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.0.0 | ||
- repo: https://github.com/tox-dev/pyproject-fmt | ||
rev: "0.11.2" | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: | ||
- flake8-bugbear==23.3.23 | ||
- flake8-comprehensions==3.12 | ||
- flake8-pytest-style==1.7.2 | ||
- flake8-spellcheck==0.28 | ||
- flake8-unused-arguments==0.0.13 | ||
- flake8-noqa==1.3.1 | ||
- pep8-naming==0.13.3 | ||
- flake8-pyproject==1.2.3 | ||
- id: pyproject-fmt | ||
additional_dependencies: ["tox>=4.6"] | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: "v2.7.1" | ||
rev: "v3.0.0-alpha.9-for-vscode" | ||
hooks: | ||
- id: prettier | ||
additional_dependencies: | ||
- [email protected] | ||
- "@prettier/[email protected]" | ||
args: ["--print-width=120", "--prose-wrap=always"] | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.33.0 | ||
hooks: | ||
- id: markdownlint | ||
- repo: meta | ||
hooks: | ||
- id: check-hooks-apply | ||
- id: check-useless-excludes | ||
- repo: https://github.com/tox-dev/pyproject-fmt | ||
rev: "0.9.2" | ||
hooks: | ||
- id: pyproject-fmt |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,101 @@ | ||
[build-system] | ||
build-backend = 'setuptools.build_meta' | ||
build-backend = "hatchling.build" | ||
requires = [ | ||
"setuptools>=67.6.1", | ||
"setuptools-scm>=7.1", | ||
"hatch-vcs>=0.3", | ||
"hatchling>=1.17.1", | ||
] | ||
|
||
[tool.setuptools_scm] | ||
write_to = "src/tox_gh/version.py" | ||
[project] | ||
name = "tox-gh" | ||
description = "Seamless integration of tox into GitHub Actions." | ||
readme = "README.md" | ||
keywords = [ | ||
"environments", | ||
"isolated", | ||
"testing", | ||
"virtual", | ||
] | ||
license = "MIT" | ||
maintainers = [{ name = "Bernát Gábor", email = "[email protected]" }] | ||
requires-python = ">=3.7" | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Internet", | ||
"Topic :: Software Development :: Libraries", | ||
"Topic :: System", | ||
] | ||
dynamic = [ | ||
"version", | ||
] | ||
dependencies = [ | ||
"tox>=4.6", | ||
] | ||
optional-dependencies.test = [ | ||
"covdefaults>=2.3", | ||
"devpi-process>=0.3", | ||
"pytest>=7.3.2", | ||
"pytest-cov>=4.1", | ||
"pytest-mock>=3.10", | ||
] | ||
urls.Documentation = "https://github.com/tox-dev/tox-gh#tox-gh" | ||
urls.Homepage = "https://github.com/tox-dev/tox-gh" | ||
urls.Source = "https://github.com/tox-dev/tox-gh" | ||
urls.Tracker = "https://github.com/tox-dev/tox-gh/issues" | ||
entry-points.tox = {"tox-gh"="tox_gh.plugin"} | ||
|
||
[tool.hatch] | ||
build.hooks.vcs.version-file = "src/tox_gh/version.py" | ||
build.targets.sdist.include = ["/src", "/tests"] | ||
version.source = "vcs" | ||
|
||
[tool.black] | ||
line-length = 120 | ||
|
||
[tool.isort] | ||
line_length = 120 | ||
profile = "black" | ||
known_first_party = ["tox_gh"] | ||
|
||
[tool.flake8] | ||
max-complexity = 22 | ||
max-line-length = 120 | ||
unused-arguments-ignore-abstract-functions = true | ||
noqa-require-code = true | ||
dictionaries = ["en_US", "python", "technical", "django"] | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = ["tests"] | ||
[tool.coverage] | ||
html.show_contexts = true | ||
html.skip_covered = false | ||
paths.source = ["src", ".tox/*/lib/*/site-packages", ".tox\\*\\Lib\\site-packages", "**/src", "**\\src"] | ||
paths.other = [".", "*/tox_gh", "*\\tox_gh"] | ||
report.fail_under = 96 | ||
run.parallel = true | ||
run.plugins = ["covdefaults"] | ||
|
||
[tool.mypy] | ||
python_version = "3.9" | ||
python_version = "3.11" | ||
show_error_codes = true | ||
strict = true | ||
|
||
[tool.ruff] | ||
select = ["ALL"] | ||
line-length = 120 | ||
target-version = "py37" | ||
isort = {known-first-party = ["platformdirs", "tests"], required-imports = ["from __future__ import annotations"]} | ||
ignore = [ | ||
"ANN101", # Missing type annotation for `self` in method | ||
"D301", # Use `r"""` if any backslashes in a docstring | ||
"D205", # 1 blank line required between summary line and description | ||
"D401", # First line of docstring should be in imperative mood | ||
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible | ||
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible | ||
"S104", # Possible binding to all interface | ||
] | ||
[tool.ruff.per-file-ignores] | ||
"tests/**/*.py" = [ | ||
"S101", # asserts allowed in tests... | ||
"FBT", # don"t care about booleans as positional arguments in tests | ||
"INP001", # no implicit namespace | ||
"D", # don"t care about documentation in tests | ||
"S603", # `subprocess` call: check for execution of untrusted input | ||
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.