Skip to content

Reenable checks and fix errors #717

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 8 commits into from
Jul 9, 2020
Merged

Conversation

ghost
Copy link

@ghost ghost commented Jul 7, 2020

Description

Fix currently ignored errors and reenable corresponding checks

  • autodoc-typehints: enable flag (TYPE_CHECKING imports)
  • flake8-bugbear: reenable checks and fix errors
  • flake8-comprehensions: reenable checks and fix errors
  • flake8 unused imports: reenable checks and fix errors
  • flake8-mypy: remove checks (no longer using)
  • mypy-torch: reenable checks and fix errors

Status

Ready

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

@ghost ghost force-pushed the reenable-checks branch from a6122e2 to 14975f9 Compare July 8, 2020 21:14
@ghost ghost changed the title [WIP] Reenable checks Reenable checks and fix errors Jul 8, 2020
Benjamin Gorman added 5 commits July 9, 2020 10:29
Fixes 11 out of the 17 warnings when running 'make html'

WARNING: Cannot resolve forward reference in type annotations of "{}":
name 'ignite' is not defined
B007
Loop control variable '{}' not used within the loop body. If this is
intended, start the name with an underscore.

B008
See Project-MONAI#727
C402
Unnecessary generator - rewrite as a dict comprehension.

C407
Unnecessary list comprehension - '{}' can take a generator.

C416
Unnecessary list comprehension - rewrite using list().
F401
'{}' imported but unused
@Nic-Ma Nic-Ma mentioned this pull request Jul 9, 2020
4 tasks
@ghost ghost force-pushed the reenable-checks branch from 14975f9 to b159161 Compare July 9, 2020 16:11
Benjamin Gorman added 2 commits July 9, 2020 11:46
- Argument "{}" to "{}" has incompatible type "{}"; expected "{}"
- Incompatible types in assignment (expression has type "{}", variable has type "{}")
- Module "{}" is not valid as a type
- Module has no attribute "{}"
- Name '{}' is not defined
- No overload variant of "{}" of "{}" matches argument types
@ghost ghost force-pushed the reenable-checks branch from b159161 to 0e20651 Compare July 9, 2020 16:46
Copy link
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, looks like we can close ticket #476 after this PR?

@ghost
Copy link
Author

ghost commented Jul 9, 2020

thanks, looks like we can close ticket #476 after this PR?

There are still various missing type hints; I think we will need to resolve them first.

Since the larger commits are taken care of I think it would be beneficial to have all checks running for the rest.

@wyli wyli merged commit 8516865 into Project-MONAI:master Jul 9, 2020
@ghost ghost deleted the reenable-checks branch July 9, 2020 17:34
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