Skip to content

MyPy disallow untyped decorators#5824

Merged
wyli merged 9 commits intoProject-MONAI:devfrom
f-schnabel:feature/5823
Jan 9, 2023
Merged

MyPy disallow untyped decorators#5824
wyli merged 9 commits intoProject-MONAI:devfrom
f-schnabel:feature/5823

Conversation

@f-schnabel
Copy link
Copy Markdown
Contributor

Fixes #5823.

Description

This PR types following decorators:

  • deprecated
  • deprecated_arg
  • deprecated_arg_default

Found here.
It also fixes any typing issues that occurred because of the additional typing.

Secondly, it fixes untyped decorator usage of the ignite library (because of optional_import) for Workflow and IgniteMetric.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.

f-schnabel and others added 9 commits January 8, 2023 18:38
Signed-off-by: Felix Schnabel <[email protected]>
Signed-off-by: Felix Schnabel <[email protected]>

Update docstrings.

Signed-off-by: Felix Schnabel <[email protected]>
Signed-off-by: Felix Schnabel <[email protected]>

Revert Workflow.

Signed-off-by: Felix Schnabel <[email protected]>
Signed-off-by: Felix Schnabel <[email protected]>
Signed-off-by: Felix Schnabel <[email protected]>
@f-schnabel f-schnabel marked this pull request as ready for review January 8, 2023 21:59
@wyli
Copy link
Copy Markdown
Contributor

wyli commented Jan 9, 2023

/build

Copy link
Copy Markdown
Contributor

@wyli wyli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, it looks good to me.

@wyli wyli merged commit 8f136db into Project-MONAI:dev Jan 9, 2023
@f-schnabel f-schnabel deleted the feature/5823 branch January 23, 2023 12:45
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.

MyPy disallow untyped decorators

2 participants