summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernát Gábor <gaborjbernat@gmail.com>2023-03-12 10:23:22 -0700
committerGitHub <noreply@github.com>2023-03-12 10:23:22 -0700
commit0e4cad0e06668fbd93be6605c9a13f871ce647c7 (patch)
treef0e65e7d0323a7095dae2440b81ca9863d522f56
parentd48565f2a7a3096fd45bf11ca194ea095bdae9ac (diff)
downloadvirtualenv-0e4cad0e06668fbd93be6605c9a13f871ce647c7.tar.gz
Add pyproject-fmt (#2518)
-rw-r--r--.pre-commit-config.yaml4
-rw-r--r--pyproject.toml46
2 files changed, 25 insertions, 25 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 0307e09..85597a7 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -79,3 +79,7 @@ repos:
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
diff --git a/pyproject.toml b/pyproject.toml
index 5169e4d..d6b284e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -67,7 +67,6 @@ urls.Homepage = "https://github.com/pypa/virtualenv"
urls.Source = "https://github.com/pypa/virtualenv"
urls.Tracker = "https://github.com/pypa/virtualenv/issues"
scripts.virtualenv = "virtualenv.__main__:run_with_catch"
-
[project.entry-points."virtualenv.activate"]
bash = "virtualenv.activation.bash:BashActivator"
batch = "virtualenv.activation.batch:BatchActivator"
@@ -76,7 +75,6 @@ fish = "virtualenv.activation.fish:FishActivator"
nushell = "virtualenv.activation.nushell:NushellActivator"
powershell = "virtualenv.activation.powershell:PowerShellActivator"
python = "virtualenv.activation.python:PythonActivator"
-
[project.entry-points."virtualenv.create"]
cpython2-mac-arm-framework = "virtualenv.create.via_global_ref.builtin.cpython.mac_os:CPython2macOsArmFramework"
cpython2-mac-framework = "virtualenv.create.via_global_ref.builtin.cpython.mac_os:CPython2macOsFramework"
@@ -90,10 +88,8 @@ pypy2-win = "virtualenv.create.via_global_ref.builtin.pypy.pypy2:Pypy2Windows"
pypy3-posix = "virtualenv.create.via_global_ref.builtin.pypy.pypy3:PyPy3Posix"
pypy3-win = "virtualenv.create.via_global_ref.builtin.pypy.pypy3:Pypy3Windows"
venv = "virtualenv.create.via_global_ref.venv:Venv"
-
[project.entry-points."virtualenv.discovery"]
builtin = "virtualenv.discovery.builtin:Builtin"
-
[project.entry-points."virtualenv.seed"]
app-data = "virtualenv.seed.embed.via_app_data.via_app_data:FromAppData"
pip = "virtualenv.seed.embed.pip_invoke:PipInvoke"
@@ -103,24 +99,6 @@ build.hooks.vcs.version-file = "src/virtualenv/version.py"
build.targets.sdist.include = ["/src", "/tests"]
version.source = "vcs"
-[tool.coverage]
-html.show_contexts = true
-html.skip_covered = false
-report.omit = [
- # site.py is ran before the coverage can be enabled, no way to measure coverage on this
- "**/src/virtualenv/create/via_global_ref/builtin/python2/site.py",
- "**/src/virtualenv/create/via_global_ref/_virtualenv.py",
- "**/src/virtualenv/activation/python/activate_this.py",
- "**/src/virtualenv/seed/wheels/embed/pip-*.whl/pip/**",
-]
-paths.source = ["src", "**/site-packages"]
-report.fail_under = 76
-run.source = ["${_COVERAGE_SRC}", "tests"]
-run.dynamic_context = "test_function"
-run.parallel = true
-run.plugins = ["covdefaults"]
-run.relative_files = true
-
[tool.black]
line-length = 120
@@ -128,9 +106,6 @@ line-length = 120
profile = "black"
known_first_party = ["virtualenv"]
-[tool.pep8]
-max-line-length = "120"
-
[tool.flake8]
max-complexity = 22
max-line-length = 120
@@ -149,6 +124,27 @@ timeout = 600
addopts = "--tb=auto -ra --showlocals --no-success-flaky-report"
env = ["PYTHONIOENCODING=utf-8"]
+[tool.coverage]
+html.show_contexts = true
+html.skip_covered = false
+report.omit = [
+ # site.py is ran before the coverage can be enabled, no way to measure coverage on this
+ "**/src/virtualenv/create/via_global_ref/builtin/python2/site.py",
+ "**/src/virtualenv/create/via_global_ref/_virtualenv.py",
+ "**/src/virtualenv/activation/python/activate_this.py",
+ "**/src/virtualenv/seed/wheels/embed/pip-*.whl/pip/**",
+]
+paths.source = ["src", "**/site-packages"]
+report.fail_under = 76
+run.source = ["${_COVERAGE_SRC}", "tests"]
+run.dynamic_context = "test_function"
+run.parallel = true
+run.plugins = ["covdefaults"]
+run.relative_files = true
+
+[tool.pep8]
+max-line-length = "120"
+
[tool.towncrier]
name = "tox"
filename = "docs/changelog.rst"