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

Improve explanation of how to ignore per file if the file name contains spaces #1519

Closed
1kastner opened this issue Jan 11, 2022 · 4 comments
Closed

Comments

@1kastner
Copy link

Please describe the problem or feature
I have a file called 01 Einfuehrung in Python.ipynb and I would like to ignore specific issues here. In the file, I harm some design principles purposefully and show the user how this creates an issue lateron. However, my per-file-ignores are not considered. I am not sure how exactly the glob pattern is working. There are a few examples, e.g. at https://flake8.pycqa.org/en/latest/user/options.html?highlight=glob%20#cmdoption-flake8-filename but they are not exhausting enough for me.

Extract of my config:

per-file-ignores =
    "01 Einfuehrung in Python.ipynb": F403, F405, E116, E731

With or without hyphens around the file name, in both cases the extract of the console output looks like this:

01-einfuehrung-in-toolbox\01 einfuehrung in python.ipynb#In[14]:1:19: E226 missing whitespace around arithmetic operator
01-einfuehrung-in-toolbox\01 einfuehrung in python.ipynb#In[14]:3:1: E731 do not assign a lambda expression, use a def
01-einfuehrung-in-toolbox\01 einfuehrung in python.ipynb#In[23]:2:23: E226 missing whitespace around arithmetic operator
01-einfuehrung-in-toolbox\01 einfuehrung in python.ipynb#In[23]:4:1: F403 'from math import *' used; unable to detect undefined names
01-einfuehrung-in-toolbox\01 einfuehrung in python.ipynb#In[23]:8:7: F405 'sin' may be undefined, or defined from star imports: math
01-einfuehrung-in-toolbox\01 einfuehrung in python.ipynb#In[23]:8:11: F405 'pi' may be undefined, or defined from star imports: math
01-einfuehrung-in-toolbox\01 einfuehrung in python.ipynb#In[23]:8:13: E226 missing whitespace around arithmetic operator

So I would wish to be able how exactly the glob patterns work but in the documentation I could not find sufficient information how to deal with spaces in file names. Thanks a lot for your assistance!

@MarcoGorelli
Copy link

Looks like you're using flake8-nb? If so, the bug report should probably go there

@asottile
Copy link
Member

don't skip the issue template, it's there for a reason

@1kastner
Copy link
Author

Looks like you're using flake8-nb? If so, the bug report should probably go there

It is not a bug, it is a request for clarification. Unless you tell me that I was doing everything in a correct manner and it should have worked.

@MarcoGorelli
Copy link

Either way, the request for clarification should go to flake8-nb

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

3 participants