-
-
Notifications
You must be signed in to change notification settings - Fork 401
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
Improves magic handling #844
Conversation
if stripped_line.endswith(('"""', "'''")) and len(stripped_line) > 3: | ||
in_multiline_comment = False | ||
else: | ||
in_multiline_comment = False |
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.
Shouldn't this line be True
(or just not exist?)
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.
Yes, will revisit, especially based on your tests. Thanks.
trying out this branch with the previous test environment leads to consistent crashes using the below command (although it also succeeded once).
Below you can see the two crash types I've encountered, the key 2785 being more common:
removing the entire function leads to no crashes. |
Trying a different approach: #847. |
Fixes #843 by providing more robust magic detection and removal.