Skip to content

Commit a736e73

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ca09d6f commit a736e73

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

src/installer/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def _get_main_parser() -> argparse.ArgumentParser:
3232
help="override prefix to install packages to",
3333
)
3434
parser.add_argument(
35-
'--executable',
35+
"--executable",
3636
metavar="path",
3737
default=sys.executable,
3838
type=str,

tests/test_main.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,15 @@ def test_main_prefix(fancy_wheel, tmp_path):
5858
destdir = tmp_path / "dest"
5959

6060
main(
61-
[str(fancy_wheel), "-d", str(destdir), "-p", "/foo", "--executable", "/monty/python3.x"],
61+
[
62+
str(fancy_wheel),
63+
"-d",
64+
str(destdir),
65+
"-p",
66+
"/foo",
67+
"--executable",
68+
"/monty/python3.x",
69+
],
6270
"python -m installer",
6371
)
6472

@@ -79,10 +87,12 @@ def test_main_prefix(fancy_wheel, tmp_path):
7987
installed_scripts = destdir.rglob("bin/*")
8088

8189
for f in installed_scripts:
82-
with f.open('rb') as fp:
90+
with f.open("rb") as fp:
8391
shebang = fp.readline()
84-
assert shebang == b'#!/monty/python3.x\n' or \
85-
shebang == b'#! /monty/python3.x\n'
92+
assert (
93+
shebang == b"#!/monty/python3.x\n"
94+
or shebang == b"#! /monty/python3.x\n"
95+
)
8696

8797

8898
def test_main_no_pyc(fancy_wheel, tmp_path):

0 commit comments

Comments
 (0)