8000 Merge pull request #184 from jakkdl/rename_executable · python-trio/flake8-async@f458a33 · GitHub
[go: up one dir, main page]

Skip to content

Commit f458a33

Browse files
authored
Merge pull request #184 from jakkdl/rename_executable
2 parents 5aaaaad + 732155f commit f458a33

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ def local_file(name: str) -> Path:
5050
long_description_content_type="text/markdown",
5151
entry_points={
5252
"flake8.extension": ["TRI = flake8_trio:Plugin"],
53-
"console_scripts": ["flake8_trio=flake8_trio:main"],
53+
"console_scripts": ["flake8-trio=flake8_trio:main"],
5454
},
5555
)

tests/test_config_and_args.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_run_flake8_trio(tmp_path: Path):
3939
write_examplepy(tmp_path)
4040
res = subprocess.run(
4141
[
42-
"flake8_trio",
42+
"flake8-trio",
4343
"./example.py",
4444
],
4545
cwd=tmp_path,
@@ -54,7 +54,7 @@ def test_systemexit_0(
5454
tmp_path: Path, monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
5555
):
5656
monkeypatch.chdir(tmp_path)
57-
monkeypatch.setattr(sys, "argv", [tmp_path / "flake8_trio", "./example.py"])
57+
monkeypatch.setattr(sys, "argv", [tmp_path / "flake8-trio", "./example.py"])
5858

5959
tmp_path.joinpath("example.py").write_text("")
6060

@@ -72,7 +72,7 @@ def test_systemexit_1(
7272
):
7373
write_examplepy(tmp_path)
7474
monkeypatch.chdir(tmp_path)
75-
monkeypatch.setattr(sys, "argv", [tmp_path / "flake8_trio", "./example.py"])
75+
monkeypatch.setattr(sys, "argv", [tmp_path / "flake8-trio", "./example.py"])
7676

7777
with pytest.raises(SystemExit) as exc_info:
7878
from flake8_trio import __main__ # noqa
@@ -89,7 +89,7 @@ def test_run_in_git_repo(tmp_path: Path):
8989
assert subprocess.run(["git", "add", "example.py"], cwd=tmp_path)
9090
res = subprocess.run(
9191
[
92-
"flake8_trio",
92+
"flake8-trio",
9393
],
9494
cwd=tmp_path,
9595
capture_output=True,
@@ -103,7 +103,7 @@ def test_run_no_git_repo(
103103
tmp_path: Path, monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
104104
):
105105
monkeypatch.chdir(tmp_path)
106-
monkeypatch.setattr(sys, "argv", [tmp_path / "flake8_trio"])
106+
monkeypatch.setattr(sys, "argv", [tmp_path / "flake8-trio"])
107107
assert main() == 1
108108
out, err = capsys.readouterr()
109109
assert err == "Doesn't seem to be a git repo; pass filenames to format.\n"
@@ -116,7 +116,7 @@ def test_run_100_autofix(
116116
write_examplepy(tmp_path)
117117
monkeypatch.chdir(tmp_path)
118118
monkeypatch.setattr(
119-
sys, "argv", [tmp_path / "flake8_trio", "--autofix=TRIO", "./example.py"]
119+
sys, "argv", [tmp_path / "flake8-trio", "--autofix=TRIO", "./example.py"]
120120
)
121121
assert main() == 1
122122

@@ -256,7 +256,7 @@ def test_enable(
256256
):
257257
write_examplepy(tmp_path)
258258
monkeypatch.chdir(tmp_path)
259-
argv = [tmp_path / "flake8_trio", "./example.py"]
259+
argv = [tmp_path / "flake8-trio", "./example.py"]
260260
monkeypatch.setattr(sys, "argv", argv)
261261

262262
def _helper(*args: str, error: bool = False, autofix: bool = False) -> None:

0 commit comments

Comments
 (0)
0