Skip to content

Clarification regarding "hack" #244

Answered by s-weigand
StefanBrand asked this question in Q&A
Discussion options

You must be logged in to vote

The reason why I call it a hack is that the Application class of flake8 isn't part of the official API and it isn't supposed to be subclassed ( see this comment from the creator of flake8 )

The problem is that notebooks need to be a kind of Schrödiger-state, ignored and used at the same time.
flake8 can't be used directly on a notebook, since it internally is just a big JSON file, thus this tool needs to step in file discovery and replace the paths to the *.ipynb files with an intermediate python representation of the notebook, use flake8 on the intermediate files and map the errors back to their origin in the notebook. The only way I found to achieve this is by using Application in a way…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by s-weigand
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
wontfix This will not be worked on
3 participants
Converted from issue

This discussion was converted from issue #111 on August 15, 2022 19:14.