From e7ce051e9191c461e0a536a84c4d66a87518de66 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Wed, 7 Dec 2022 00:45:02 +0000 Subject: [PATCH] Fix a typo in an error message The listed operators were incorrect. --- packaging/_parser.py | 2 +- tests/test_requirements.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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" " ^" )