Skip to content
Advertisement

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:

JavaScript

While keeping errors like

JavaScript

I am aware of the --ignore parameter, but as far as I understand this would only allow to exclude F821 in general and not for a specific variable name.

Thanks

Advertisement

Answer

You can specify an additional list of builtins by using the builtins parameter / configuration:

JavaScript
JavaScript
Advertisement