Skip to content

Remove unnecessary use of comprehension#2719

Merged
wyli merged 6 commits intodevfrom
deepsource-fix-1eb41095
Aug 7, 2021
Merged

Remove unnecessary use of comprehension#2719
wyli merged 6 commits intodevfrom
deepsource-fix-1eb41095

Conversation

@deepsource-autofix
Copy link
Copy Markdown
Contributor

No description provided.

deepsource-autofix bot and others added 4 commits August 7, 2021 13:46
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
…tatement (#2717)

* Refactor unnecessary `else` / `elif` when `if` block has a `return` statement

* Unnecessary `else`/`elif` used after `raise` PYL-R1720

Signed-off-by: Wenqi Li <[email protected]>

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Wenqi Li <[email protected]>
* Replace ternary syntax with if expression

* fixes Duplicate dictionary keys PYL-W0109

Signed-off-by: Wenqi Li <[email protected]>

* remove Unused variable data_

Signed-off-by: Wenqi Li <[email protected]>

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Wenqi Li <[email protected]>
@wyli
Copy link
Copy Markdown
Contributor

wyli commented Aug 7, 2021

/black

monai-bot and others added 2 commits August 7, 2021 13:53
Signed-off-by: Wenqi Li <[email protected]>
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.

this is almost an automatic fix, added "self.scaler" to 'monai/engines/workflow.py' otherwise this line is a property definition out of the class constructor

self.scaler = torch.cuda.amp.GradScaler() if self.amp else None
cc @Nic-Ma

@wyli wyli enabled auto-merge (squash) August 7, 2021 14:12
@wyli wyli merged commit 1ffa909 into dev Aug 7, 2021
@wyli wyli deleted the deepsource-fix-1eb41095 branch August 7, 2021 15:36
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.

2 participants