Skip to content
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

cannot check 'python dict codestype' in jupyter lab #28

Open
yushiokamura opened this issue Dec 14, 2020 · 1 comment
Open

cannot check 'python dict codestype' in jupyter lab #28

yushiokamura opened this issue Dec 14, 2020 · 1 comment

Comments

@yushiokamura
Copy link

yushiokamura commented Dec 14, 2020

Hi, I use pycodestyle_magic. This magic code is very nice.

When I check pythgon dict code style by %%pycodestyle, an error occurs.

for example, when I try

%%pycodestyle
{"a":0,"b":1}

then return ValueError

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-19-2c11b8fb9c7b> in <module>
----> 1 get_ipython().run_cell_magic('pycodestyle', '', '{"a":0,"b":1}\n')

~/python3.8/site-packages/IPython/core/interactiveshell.py in run_cell_magic(self, magic_name, line, cell)
   2379             with self.builtin_trap:
   2380                 args = (magic_arg_s, cell)
-> 2381                 result = fn(*args, **kwargs)
   2382             return result
   2383 

~/python3.8/site-packages/pycodestyle_magic.py in pycodestyle(line, cell, auto)
    173         #logger.info(line)
    174         # on windows drive path also contains :
--> 175         line, col, error = line.split(':')[-4:]
    176         # do not subtract 1 for line for %%pycodestyle, inc pre py3.6 string
    177         if auto:

ValueError: too many values to unpack (expected 3)

It seems that the cause is that ":" is included in the code. right?

Is there a way around this error?

@jtweeder
Copy link

#20 seems to be the same issue. Potential workaround proposed on #20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants