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

Remove circular import #270

Merged
merged 1 commit into from
Jul 12, 2017
Merged

Conversation

JoostJM
Copy link
Collaborator

@JoostJM JoostJM commented Jul 10, 2017

Currently, PyRadiomics contains one circular import: __init__.py imports base, while base imports radiomics (__init__.py). However, base is only needed for the inheritance check in getFeatureClasses, change this to allow removal of the circular import.

While circular imports are allowed in python, then can cause unexpected behavior/bugs, and can mask an underlying bug preventing the import of a class (which is subsequently reported as a "cannont import name" error, instead of the actual bug preventing the import).

cc @Radiomics/developers

`__init__.py` imports `base`, while `base` imports `radiomics` (`__init__.py`). However, base is only needed for the inheritance check in `getFeatureClasses`, change this to allow removal of the circular import.
@pieper
Copy link
Contributor

pieper commented Jul 10, 2017

👍

@JoostJM JoostJM merged commit 21375ab into AIM-Harvard:master Jul 12, 2017
@JoostJM JoostJM deleted the Remove-circular-import branch July 12, 2017 15:58
@JoostJM JoostJM added the bug label Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants