Skip to content

Commit

Permalink
Add pyproject-fmt (#2518)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat committed Mar 12, 2023
1 parent d48565f commit 0e4cad0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
46 changes: 21 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -103,34 +99,13 @@ 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

[tool.isort]
profile = "black"
known_first_party = ["virtualenv"]

[tool.pep8]
max-line-length = "120"

[tool.flake8]
max-complexity = 22
max-line-length = 120
Expand All @@ -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"
Expand Down

0 comments on commit 0e4cad0

Please sign in to comment.