-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Cut-n-paste of code with __file__ into ipython leads to an exception. It would be good for ipython_utils.py to define this with a dummy value for convenience (e.g., for use in ~/.ipython/profile_default/startup/25-quarter.py).
In [22]: # Sanity checks
...: # note: should precede module import, but isort messes up order and hard to configure.
...: debug.assertion(__file__.startswith(SRC_DIR))
...:
...:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[22], line 3
1 # Sanity checks
2 # note: should precede module import, but isort messes up order and hard to configure.
----> 3 debug.assertion(__file__.startswith(SRC_DIR))
NameError: name '__file__' is not defined
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request