diff --git a/packaging/_parser.py b/packaging/_parser.py index 103f679a..d03119a1 100644 --- a/packaging/_parser.py +++ b/packaging/_parser.py @@ -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" ) diff --git a/tests/test_requirements.py b/tests/test_requirements.py index 93839d69..92cf9ce6 100644 --- a/tests/test_requirements.py +++ b/tests/test_requirements.py @@ -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" " ^" ) @@ -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" " ^" ) @@ -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" " ^" )