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

max_line_length option ignored #21

Open
stoffprof opened this issue Dec 9, 2019 · 4 comments
Open

max_line_length option ignored #21

stoffprof opened this issue Dec 9, 2019 · 4 comments

Comments

@stoffprof
Copy link

It looks like the max_line_length option for flake8 is being ignored in my setting. Can you see what I'm doing wrong?

Screen Shot

Note that if I include --ignore E231 the warning message is suppressed, so that option seems to be working.

Here's the raw code for my example:

%load_ext pycodestyle_magic
%flake8_on --max_line_length 60

import numpy as np
import pandas as pd
import string

pd.DataFrame(np.random.randn(100,26), columns=list(string.ascii_uppercase))
len("pd.DataFrame(np.random.randn(100,26), columns=list(string.ascii_uppercase))")
@mattijn
Copy link
Owner

mattijn commented Dec 9, 2019

Thanks for raising the issue!
Your code gives me the following:

image

Which raises on the line that is too long. I'm on pycodestyle_magic version 0.5. But funny enough the last line that you mention doesn't work for me either.

@stoffprof
Copy link
Author

My pycodestyle_magic version is also 0.5. Can you think of what else the difference could be?

@mattijn
Copy link
Owner

mattijn commented Dec 9, 2019

Hm. Its hard to say. The settings are parsed to flake8 here:

    flake = flake8_module.get_style_guide(
        extend_ignore=ignore_codes, 
        max_line_length=max_line_length
    )

If I do:

import flake8
flake8.__version__

I got version 3.7.9. What version are you on?
But since the ignore_codes part for you is working.. that probably won't be the problem

@stoffprof
Copy link
Author

Ya, I'm on 3.7.9 also.

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