diff --git a/pytao/interface.tpl.py b/pytao/interface.tpl.py index d1061164..f6628f9e 100644 --- a/pytao/interface.tpl.py +++ b/pytao/interface.tpl.py @@ -396,6 +396,9 @@ def __init__( ) try: self.register_cell_magic() + except NameError: + # Not in IPython + pass except Exception: logger.debug("Failed to register cell magic", exc_info=True) diff --git a/pytao/interface_commands.py b/pytao/interface_commands.py index 580cd4e8..cbf12800 100644 --- a/pytao/interface_commands.py +++ b/pytao/interface_commands.py @@ -2,7 +2,7 @@ # AUTOGENERATED FILE - DO NOT MODIFY # This file was generated by the script `generate_interface_commands.py`. # Any modifications may be overwritten. -# Generated on: 2024-10-21 10:37:29 +# Generated on: 2024-10-22 09:58:32 # ============================================================================== from __future__ import annotations @@ -403,6 +403,9 @@ def __init__( ) try: self.register_cell_magic() + except NameError: + # Not in IPython + pass except Exception: logger.debug("Failed to register cell magic", exc_info=True) diff --git a/pytao/tests/test_interface_commands.py b/pytao/tests/test_interface_commands.py index d474756b..afc3f001 100644 --- a/pytao/tests/test_interface_commands.py +++ b/pytao/tests/test_interface_commands.py @@ -2,7 +2,7 @@ # AUTOGENERATED FILE - DO NOT MODIFY # This file was generated by the script `generate_interface_commands.py`. # Any modifications may be overwritten. -# Generated on: 2024-10-21 10:37:29 +# Generated on: 2024-10-22 09:58:32 # ============================================================================== from .conftest import ensure_successful_parsing, new_tao