Skip to content

remove flake8-mypy tests #550

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
Jun 12, 2020
Merged

Conversation

wyli
Copy link
Contributor

@wyli wyli commented Jun 12, 2020

related to #476.

currently we have both flake8-mypy (as a plugin of flake8) and mypy package doing similar type checking. flake8-mypy has some issues and the error messages are not very straightforward.

this PR proposes to remove flake8-mypy tests.

Status

Ready

Types of changes

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

@wyli wyli requested a review from Nic-Ma June 12, 2020 13:13
Copy link
Contributor

@Nic-Ma Nic-Ma left a comment

Choose a reason for hiding this comment

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

It looks good to me.
@hjmjohnson could you please help also review this PR as you guys are working on this topic?
Thanks.

Copy link
Contributor

@hjmjohnson hjmjohnson left a comment

Choose a reason for hiding this comment

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

Agree 100% the flake8-mypy is not maintained recently.

@wyli wyli merged commit d42f15d into Project-MONAI:master Jun 12, 2020
ghost pushed a commit to BRAINSia/MONAI that referenced this pull request Jul 7, 2020
ghost pushed a commit to BRAINSia/MONAI that referenced this pull request Jul 7, 2020
ghost pushed a commit to BRAINSia/MONAI that referenced this pull request Jul 8, 2020
ghost pushed a commit to BRAINSia/MONAI that referenced this pull request Jul 9, 2020
wyli pushed a commit that referenced this pull request Jul 9, 2020
* Set set_type_checking_flag for autodoc-typehints

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

* Reenable and fix flake8-bugbear errors

B007
Loop control variable '{}' not used within the loop body. If this is
intended, start the name with an underscore.

B008
See #727

* Reenable and fix flake8-comprehensions errors

C402
Unnecessary generator - rewrite as a dict comprehension.

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

C416
Unnecessary list comprehension - rewrite using list().

* Reenable and fix flake8 unused import errors

F401
'{}' imported but unused

* Remove flake8-mypy configurations

See #550

* Reenable and fix mypy-torch errors

- 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

* Update the issue number of signature incompatible

See #729
@wyli wyli deleted the remove-flake8-mypy branch October 6, 2020 12:51
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.

3 participants