Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge logic of add_cells and required_imports #156

Open
lukany opened this issue Sep 27, 2023 · 0 comments
Open

Merge logic of add_cells and required_imports #156

lukany opened this issue Sep 27, 2023 · 0 comments
Labels
technical debt Technical debt

Comments

@lukany
Copy link
Contributor

lukany commented Sep 27, 2023

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`).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical debt Technical debt
Development

No branches or pull requests

1 participant