Pre-commit throws errors for unused imports. The __init__.py typically imports classes from modules for use when the package is loaded in other projects, but doesn't used the classes within the script itself. There is a conflict between these two preferences, and we will side with pre-commit. We will therefore need to call the SimulationBundle class in scripts.
Changes
Removed the call to import SimulationBundle from .abc_classes in the __init__.py script of the package. Made the import of SimulationBundle in the model test script more explicit as a separate line of code
Overview
Pre-commit throws errors for unused imports. The
__init__.py
typically imports classes from modules for use when the package is loaded in other projects, but doesn't used the classes within the script itself. There is a conflict between these two preferences, and we will side with pre-commit. We will therefore need to call the SimulationBundle class in scripts.Changes
Removed the call to import
SimulationBundle
from.abc_classes
in the__init__.py
script of the package. Made the import ofSimulationBundle
in the model test script more explicit as a separate line of code