8000 rename console script flake8_trio -> flake8-trio by jakkdl · Pull Request #184 · python-trio/flake8-async · GitHub
[go: up one dir, main page]

Skip to content
8000

rename console script flake8_trio -> flake8-trio #184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ def local_file(name: str) -> Path:
long_description_content_type="text/markdown",
entry_points={
"flake8.extension": ["TRI = flake8_trio:Plugin"],
"console_scripts": ["flake8_trio=flake8_trio:main"],
"console_scripts": ["flake8-trio=flake8_trio:main"],
},
)
14 changes: 7 additions & 7 deletions tests/test_config_and_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_run_flake8_trio(tmp_path: Path):
write_examplepy(tmp_path)
res = subprocess.run(
[
"flake8_trio",
"flake8-trio",
"./example.py",
],
cwd=tmp_path,
Expand All @@ -54,7 +54,7 @@ def test_systemexit_0(
tmp_path: Path, monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
):
monkeypatch.chdir(tmp_path)
monkeypatch.setattr(sys, "argv", [tmp_path / "flake8_trio", "./example.py"])
monkeypatch.setattr(sys, "argv", [tmp_path / "flake8-trio", "./example.py"])

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

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

with pytest.raises(SystemExit) as exc_info:
from flake8_trio import __main__ # noqa
Expand All @@ -89,7 +89,7 @@ def test_run_in_git_repo(tmp_path: Path):
assert subprocess.run(["git", "add", "example.py"], cwd=tmp_path)
res = subprocess.run(
[
"flake8_trio",
"flake8-trio",
],
cwd=tmp_path,
capture_output=True,
Expand All @@ -103,7 +103,7 @@ def test_run_no_git_repo(
tmp_path: Path, monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
):
monkeypatch.chdir(tmp_path)
monkeypatch.setattr(sys, "argv", [tmp_path / "flake8_trio"])
monkeypatch.setattr(sys, "argv", [tmp_path / "flake8-trio"])
assert main() == 1
out, err = capsys.readouterr()
assert err == "Doesn't seem to be a git repo; pass filenames to format.\n"
Expand All @@ -116,7 +116,7 @@ def test_run_100_autofix(
write_examplepy(tmp_path)
monkeypatch.chdir(tmp_path)
monkeypatch.setattr(
sys, "argv", [tmp_path / "flake8_trio", "--autofix=TRIO", "./example.py"]
sys, "argv", [tmp_path / "flake8-trio", "--autofix=TRIO", "./example.py"]
)
assert main() == 1

Expand Down Expand Up @@ -256,7 +256,7 @@ def test_enable(
):
write_examplepy(tmp_path)
monkeypatch.chdir(tmp_path)
argv = [tmp_path / "flake8_trio", "./example.py"]
argv = [tmp_path / "flake8-trio", "./example.py"]
monkeypatch.setattr(sys, "argv", argv)

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