Skip to content
This repository was archived by the owner on Feb 19, 2026. It is now read-only.
This repository was archived by the owner on Feb 19, 2026. It is now read-only.

Merge logic of add_cells and required_imports #156

Description

@lukany

Logic of add_cells() and required_imports() is tightly coupled. E.g. see 9e8f50f where self.subsections_to_show_with_low_verbosity is used within both the methods. This kind of coupling introduces risk of bugs that the methods are not in sync and some imports are omitted (such as the linked PR is fixing).

I propose to merge the logic of the two methods. I am not sure how though. Maybe add_cells() can add both cells as well as imports that are required for the cells to execute successfully. required_imports() would then collect theses imports (from e.g. self._cell_imports()and potentially add some more (e.g. fromsuper`).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions