Skip to content

Commit

Permalink
Deblack with black 24.1.0
Browse files Browse the repository at this point in the history
Black 24.1.0 was released jan 26.

https://github.com/psf/black/blob/main/CHANGES.md#2410

> This release introduces the new 2024 stable style (#4106)

Signed-off-by: Stanislav Levin <slev@altlinux.org>
  • Loading branch information
stanislavlevin committed Jan 26, 2024
1 parent 5444898 commit 2adcf3a
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 12 deletions.
1 change: 1 addition & 0 deletions backend/__init__.py
@@ -1,6 +1,7 @@
"""
Self-hosted backend for self-build (bootstrap).
"""

from .wheel import build_wheel
from .sdist import build_sdist

Expand Down
1 change: 1 addition & 0 deletions backend/sdist.py
Expand Up @@ -10,6 +10,7 @@
- include *.py for now
- exclude __pycache__ and .pyc
"""

from io import BytesIO
from pathlib import Path
import logging
Expand Down
1 change: 1 addition & 0 deletions backend/wheel.py
Expand Up @@ -10,6 +10,7 @@
- include *.py for now
- exclude __pycache__ and .pyc
"""

from base64 import urlsafe_b64encode
from io import TextIOWrapper, BytesIO
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions src/pyproject_installer/__main__.py
Expand Up @@ -11,6 +11,7 @@
- RECORD is dropped (PEP627)
- signature verification of signed wheel is not supported
"""

from pathlib import Path
import argparse
import json
Expand Down
Expand Up @@ -2,6 +2,7 @@
Intended to be run in subprocess to call build backend's hooks.
Must not have dependencies other than stdlib.
"""

from importlib import import_module
from pathlib import Path
import argparse
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_buildable.py
@@ -1,6 +1,7 @@
"""
Check if pyproject_installer is buildable by other tools like `build` or `pip`
"""

import subprocess


Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_build/test_pyproject_parser.py
@@ -1,4 +1,5 @@
"""Tests for parser of pyproject.toml"""

import json
import textwrap
import sys
Expand Down
18 changes: 9 additions & 9 deletions tests/unit/test_install/test_installer.py
Expand Up @@ -338,9 +338,9 @@ def test_data_invalid_scheme_key(wheel_contents, wheel, installed_wheel):
@pytest.mark.parametrize("ep_spec", ("foo", "foo.bar"))
def test_invalid_entry_points(ep_spec, wheel_contents, wheel, installed_wheel):
contents = wheel_contents()
contents[
"foo-1.0.dist-info/entry_points.txt"
] = f"[console_scripts]\nbar = {ep_spec}\n"
contents["foo-1.0.dist-info/entry_points.txt"] = (
f"[console_scripts]\nbar = {ep_spec}\n"
)
with pytest.raises(ValueError, match="Invalid entry_points specification"):
install_wheel(
wheel(contents=contents), destdir=installed_wheel().destdir
Expand Down Expand Up @@ -414,9 +414,9 @@ def test_installation_filelist(
strip_dist_info, wheel_contents, wheel, installed_wheel
):
contents = wheel_contents()
contents[
"foo-1.0.dist-info/entry_points.txt"
] = "[console_scripts]\nbar = foo:main\n"
contents["foo-1.0.dist-info/entry_points.txt"] = (
"[console_scripts]\nbar = foo:main\n"
)

dest_wheel = installed_wheel()
kwargs = {"destdir": dest_wheel.destdir}
Expand Down Expand Up @@ -552,9 +552,9 @@ def test_entry_points_scripts(
"pyproject_installer.install_cmd._install.sys.executable", sys_exec
)
contents = wheel_contents()
contents[
"foo-1.0.dist-info/entry_points.txt"
] = "[console_scripts]\nbar = foo:main\n"
contents["foo-1.0.dist-info/entry_points.txt"] = (
"[console_scripts]\nbar = foo:main\n"
)

dest_wheel = installed_wheel()

Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_run/test_env.py
Expand Up @@ -52,9 +52,9 @@ def main():
print("Hello, World! ({script_name})")
"""
)
contents[
f"{contents.distinfo}/entry_points.txt"
] = f"[console_scripts]\n{script_name} = {distr}:main\n"
contents[f"{contents.distinfo}/entry_points.txt"] = (
f"[console_scripts]\n{script_name} = {distr}:main\n"
)

return wheel(name=f"{distr}-1.0-py3-none-any.whl", contents=contents)

Expand Down
1 change: 1 addition & 0 deletions tools/vendored.py
Expand Up @@ -13,6 +13,7 @@
- packaging: https://github.com/pypa/packaging
git diff 23.1:src/packaging @:src/pyproject_installer/_vendor/packaging
"""

from pathlib import Path
import sys
import subprocess
Expand Down

0 comments on commit 2adcf3a

Please sign in to comment.