Skip to content

Commit 35cc540

Browse files
ignore flake8 for nbclient imports so os.environ.setdefault("JUPYTER_PLATFORM_DIRS", "1") can be run before importing jupyter paths.
1 parent 8970d9b commit 35cc540

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_tutorials.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44

55
import nbformat
66
import pytest
7-
from nbclient import NotebookClient
8-
from nbclient.exceptions import CellExecutionError
97

108
# Ensure Jupyter uses the new platformdirs paths to avoid DeprecationWarning
119
# This will become the default in `jupyter_core` v6
1210
os.environ.setdefault("JUPYTER_PLATFORM_DIRS", "1")
1311

12+
from nbclient import NotebookClient # noqa: E402
13+
from nbclient.exceptions import CellExecutionError # noqa: E402
14+
1415

1516
def _find_tutorial_notebooks():
1617
"""Return a sorted list of notebook Paths under doc/tutorials.

0 commit comments

Comments
 (0)