Skip to content

Commit

Permalink
Fix a typo in an error message
Browse files Browse the repository at this point in the history
The listed operators were incorrect.
  • Loading branch information
pradyunsg committed Dec 7, 2022
1 parent cb09331 commit e7ce051
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packaging/_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,5 +327,5 @@ def _parse_marker_op(tokenizer: Tokenizer) -> Op:
else:
return tokenizer.raise_syntax_error(
"Expected marker operator, one of "
"<=, <, !=, ==, >=, >, ~=, ===, not, not in"
"<=, <, !=, ==, >=, >, ~=, ===, in, not in"
)
6 changes: 3 additions & 3 deletions tests/test_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def test_error_invalid_marker_notin_without_whitespace(self) -> None:
assert ctx.exconly() == (
"packaging.requirements.InvalidRequirement: "
"Expected marker operator, one of <=, <, !=, ==, >=, >, ~=, ===, "
"not, not in\n"
"in, not in\n"
" name; '3.7' notin python_version\n"
" ^"
)
Expand All @@ -408,7 +408,7 @@ def test_error_when_no_word_boundary(self) -> None:
assert ctx.exconly() == (
"packaging.requirements.InvalidRequirement: "
"Expected marker operator, one of <=, <, !=, ==, >=, >, ~=, ===, "
"not, not in\n"
"in, not in\n"
" name; '3.6'inpython_version\n"
" ^"
)
Expand Down Expand Up @@ -441,7 +441,7 @@ def test_error_invalid_marker_with_invalid_op(self) -> None:
assert ctx.exconly() == (
"packaging.requirements.InvalidRequirement: "
"Expected marker operator, one of <=, <, !=, ==, >=, >, ~=, ===, "
"not, not in\n"
"in, not in\n"
" name; '3.7' ~ python_version\n"
" ^"
)
Expand Down

0 comments on commit e7ce051

Please sign in to comment.