Skip to content

476 Add type hints to monai/visualize/ #709

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

Merged
merged 1 commit into from
Jul 6, 2020

Conversation

ghost
Copy link

@ghost ghost commented Jul 6, 2020

Description

Iteration of #476

  • use 'if TYPE_CHECKING:' for optional imports
  • add type hints
  • remove docstring type hints

optional_import does not enable correct type hinting
so 'if TYPE_CHECKING:' is used. The type annotation must
then be a forward reference i.e. it must be in quotes.

Status

Ready

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Docstrings/Documentation updated

- use 'if TYPE_CHECKING:' for optional imports
- add type hints
- remove docstring type hints

optional_import does not enable correct type hinting
so 'if TYPE_CHECKING:' is used. The type annotation must
then be a forward reference i.e. it must be in quotes.
@ghost ghost force-pushed the type-hints-visualize branch from 558470c to 7d6ee02 Compare July 6, 2020 21:25
@wyli wyli merged commit 07be12b into Project-MONAI:master Jul 6, 2020
@ghost ghost deleted the type-hints-visualize branch July 6, 2020 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant