You might want to have a cell just for __future__
imports, but there are no restrictions
These cells just run like normal when testing with nbdev_test_nbs
assert Tree(Tree(None,None),None) is not None
You can use special comments to export a cell containing __future__
imports
If you see SyntaxError: from __future__ imports must occur at the beginning of the file
:
%nbdev_export
from __future__ import annotations
you'll need to move the __future__
import to the top of the cell:
from __future__ import annotations
%nbdev_export
# from decision_tree.test.from_future import *
# Tree(Tree(None,None),None), annotations