-
Notifications
You must be signed in to change notification settings - Fork 9
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
Spacing around colons can crash pycodestyle_magic #20
Milestone
Comments
Oh wait. I didn't read your issue right.. I can reproduce the error. Hm, indeed strange! |
This line: line, col, error = line.split(':')[-4:] splits on line_split = line.split(' ')
line, col, _ = line_split[0].split(':')[-3:]
error = ' '.join(line_split[1::]) But I broke my python |
This was referenced Jan 11, 2022
unDeadHerbs
added a commit
to unDeadHerbs/pycodestyle_magic
that referenced
this issue
Oct 3, 2022
By use a magic string that shouldn't appear in code, we make parsing easier. Really we should use a parser or something; but, this is an easy enough fix. Fixes mattijn#20
unDeadHerbs
added a commit
to unDeadHerbs/pycodestyle_magic
that referenced
this issue
Oct 3, 2022
By use a magic string that shouldn't appear in code, we make parsing easier. Really we should use a parser or something; but, this is an easy enough fix. Fixes mattijn#20
unDeadHerbs
added a commit
to unDeadHerbs/pycodestyle_magic
that referenced
this issue
Oct 3, 2022
By use a magic string that shouldn't appear in code, we make parsing easier. Really we should use a parser or something; but, this is an easy enough fix. Fixes mattijn#20
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using pycodestyle in "cell-at-a-time" mode, with %%pycodestyle as the first line in a cell seems to be very sensitive the spacing around colons.
In particular, a space before a colon that introduces a new block, such as:
for i in range(5) :
will crash it with an error that appears to be related to parsing windows drive names, though I'm using this on linux.
Similar errors occur in defining a dictionary if there is a space before a colon or no space after a colon.
The text was updated successfully, but these errors were encountered: