Check whether import
s are at top of notebook
#13025
Labels
needs-decision
Awaiting a decision from a maintainer
notebook
Related to (Jupyter) notebooks
rule
Implementing or modifying a lint rule
Since #8872,
E402
works per cell in Jupyter notebooks. However, in some projects, you may want to have theimport
s in one cell on the top of the notebook (e.g. to avoid cluttering code cells further below).Would it be an idea to either introduce:
lint.pycodestyle
setting likeimports-at-top-of-notebook
(defaults toFalse
)?E403
rule that is specifically for notebooks that works at notebook level? This is a variant of what @dhruvmanila suggested in UpdateE402
to work at cell level for notebooks #8872 (comment).I would suggest 1., to avoid potential rule code clashes (e.g. #2194).
The text was updated successfully, but these errors were encountered: