Skip to content

Tag: flake8

vscode Flake8 ignore

Flake8 was installed lately by one of the updates of vscode. I think it is time to comply to the “rules” of python to writer better and more readable code. Unfortunately I have some errors that I cannot fix in the code (no discussion about that, but a local module has to be loaded before some othe…

How to use flake8 as unittest case?

I want to make flake8 a unittest case for all my source files. The unittest have to fail when the code is not PEP8 conform. I still do this with pycodestyle that way. But I don’t know how to do this with flake8 after import flake8. Answer As others have pointed out, this is not something you should be d…

Filter out specific errors from Flake8 results

We are writing notebooks in databricks. When we put them to git we want to run flake8 on them to check for new problems in the code. As databricks has some predefined variables those are undefined in the code itself. Is it possible to filter our errors like: While keeping errors like I am aware of the –…