Skip to content

Commit

Permalink
feat: suggest installing poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoliwa committed Mar 2, 2019
1 parent 76b980f commit 5b6038c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion flake8_nitpick/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ def load_toml(self) -> YieldFlake8Error:
self.pyproject_path: Path = self.root_dir / PyProjectTomlChecker.file_name
if not self.pyproject_path.exists():
yield self.flake8_error(
1, f"{PyProjectTomlChecker.file_name} does not exist. Run 'poetry init' to create one."
1,
f"{PyProjectTomlChecker.file_name} does not exist. Install poetry and run 'poetry init' to create it.",
)
return

Expand Down
2 changes: 1 addition & 1 deletion nitpick-style.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[[files.absent]]
file = "requirements.txt"
message = "Use 'poetry init' to create pyproject.toml and move dependencies to it"
message = "Install poetry, run 'poetry init' to create pyproject.toml, and move dependencies to it"

[[files.absent]]
file = ".isort.cfg"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pyproject_toml.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
def test_missing_pyproject_toml(request):
"""Suggest poetry init when pyproject.toml does not exist."""
assert ProjectMock(request, pyproject_toml=False).lint().errors == {
f"NIP201 {PyProjectTomlChecker.file_name} does not exist. Run 'poetry init' to create one."
f"NIP201 {PyProjectTomlChecker.file_name} does not exist. Install poetry and run 'poetry init' to create it."
}

0 comments on commit 5b6038c

Please sign in to comment.