Skip to content
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

Test rules in pyflakes directory #271

Open
wants to merge 2 commits into
base: gh/"ansley"/1/base
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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 pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ version-file = "src/fixit/__version__.py"
features = ["dev", "pretty"]

[tool.hatch.envs.default.scripts]
test = "python -m fixit.tests"
test = "python3 -m fixit.tests"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this change needed? Hatch environments should be controlled enough that just python will always work.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, didn't know that

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this being "python3" is what's causing the CI failures on windows. My guess is that the virtualenv doesn't have a python3.exe in it, and so it's finding a random non-venv runtime, and therefore can't find/import fixit.

typecheck = "mypy --install-types --non-interactive src/fixit"

[tool.hatch.envs.lint.scripts]
Expand Down
4 changes: 4 additions & 0 deletions src/fixit/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@
globals(),
collect_rules(enables=[QualifiedRule("fixit.rules")], disables=[]),
)
add_lint_rule_tests_to_module(
globals(),
collect_rules(enables=[QualifiedRule("fixit.rules.pyflakes")], disables=[]),
amyreese marked this conversation as resolved.
Show resolved Hide resolved
)