-
Notifications
You must be signed in to change notification settings - Fork 405
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
Fix argument annotation in converter.parse()
signature
#1665
Conversation
@@ -1375,16 +1376,13 @@ def parse(value: bundles.MetadataEntry | bytes | str | pathlib.Path, | |||
valueStr = '' | |||
|
|||
if (common.isListLike(value) | |||
and isinstance(value, collections.abc.Sequence) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant now that isListLike no longer permits sets
and len(value) == 2 | ||
and isinstance(value[1], int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was preventing the more informative error message below, allowing later elif
blocks to match and crash.
with self.assertRaises(ConverterException): | ||
parse((fp, 8)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow... bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Looks great.
Fixes error reported in #1664 (comment).
Adds missing coverage.