Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

.flake8_nb does not work in certain cases #225

Closed
jbloom opened this issue Jun 18, 2022 · 2 comments
Closed

.flake8_nb does not work in certain cases #225

jbloom opened this issue Jun 18, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jbloom
Copy link

jbloom commented Jun 18, 2022

I'm using flake8_nb version 0.4.0.

I have a subdirectory in my project called ./docs/ which contains Jupyter notebooks that fail the flaking, e.g. ./docs/fail_flake8.ipynb.

My .flake8_nb configuration file includes docs/*:

[flake8_nb]
exclude =
    .*,
    _*,
    docs/*

Nonetheless, flake8_nb reports failures on the ./docs/fail_flake8.ipynb notebook.

@jbloom jbloom added the bug Something isn't working label Jun 18, 2022
@s-weigand
Copy link
Owner

If you use docs instead of docs/* it should work.
I tried docs/**/* and it also doesn't work, looks like this is an upstream issue with flake8 (at least on windows where it expands the pattern to a path with \\).
Also, you should rather use extend-exclude instead of exclude, that way you won't overwrite the default values of exclude (['.svn', 'CVS', '.bzr', '.hg', '.git', '__pycache__', '.tox', '.eggs', '*.egg', '.ipynb_checkpoints'])

If the notebook is failing because you want to show off some bad practice, you could just ignore those cells/the specific error in those cells (see cell-tags), that way you can show off the bad practice without accidentally adding some yourself in other places of the notebooks.

Feel free to close this issue if this resolves your problem.

jbloom added a commit to dms-vep/dms-vep-pipeline that referenced this issue Jun 18, 2022
@jbloom
Copy link
Author

jbloom commented Jun 18, 2022

That worked, thanks!

@jbloom jbloom closed this as completed Jun 18, 2022
Repository owner locked and limited conversation to collaborators Aug 15, 2022
@s-weigand s-weigand converted this issue into discussion #243 Aug 15, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants