Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pycodestyle_magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ def pycodestyle(line, cell, auto=False):
f.close()
# now we can check the file by name.
# we might be able to use 'stdin', have to check implementation
format = '%(row)d:%(col)d: %(code)s %(text)s'
format_divider = 'FORMAT_DIVIDER'
format = format_divider+'%(row)d'+format_divider+'%(col)d'+format_divider+' %(code)s %(text)s'
pycodestyle = pycodestyle_module.StyleGuide(format=format)
# check the filename
pcs_result = pycodestyle.check_files(paths=[f.name])
Expand All @@ -171,8 +172,7 @@ def pycodestyle(line, cell, auto=False):

for line in stdout:
#logger.info(line)
# on windows drive path also contains :
line, col, error = line.split(':')[-4:]
line, col, error = line.split(format_divider,4)[1:]
# do not subtract 1 for line for %%pycodestyle, inc pre py3.6 string
if auto:
add = -1
Expand Down