Skip to content
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

Enable strictness flags that require no source code changes #6237

Conversation

Projects
None yet
4 participants
@Michael0x2a
Copy link
Collaborator

commented Jan 22, 2019

This diff tightens up mypy's self-check slightly by enabling some of the --strict flags that mypy is currently already passing.

I also thought about enabling --warn-unused-ignores since there were only four places where we need to delete a # type: ignore comment, but ultimately decided against it: I don't want to complicate typeshed contributions (since typeshed's tests run mypy's self-check) and because one of those ignores looked like it was related to weird mypyc shenanigans (the lxml import in mypy/report.py).

I did go ahead and remove the other three # type: ignores though.

Add strictness flags that can be added with no source code changes
This diff tightens up mypy's self-check slightly by enabling some
of the `--strict` flags that mypy is currently already passing.

I also thought about enabling `--warn-unused-ignores` since there were
only four places where we need to delete a `# type: ignore` comment, but
ultimately decided against it: I don't want to complicate typeshed
contributions (since typeshed's tests run mypy's self-check) and because
one of those ignores looked like it was related to weird mypyc
shenanigans (the lxml import in mypy/report.py).

I did go ahead and remove the other three `# type: ignores` though.

@Michael0x2a Michael0x2a changed the title Add strictness flags that can be added with no source code changes Enable strictness flags that require no source code changes Jan 22, 2019

@@ -15,3 +18,4 @@ platform = mypyc
# needs py2 compatibility
[mypy-mypy.test.testextensions]
disallow_untyped_defs = False
check_untyped_defs = False

This comment has been minimized.

Copy link
@ilevkivskyi

ilevkivskyi Jan 22, 2019

Collaborator

Wait, why do we need these tests here? I though mypy_extensions were moved to a separate repo, but it looks like the tests were left behind. @msullivan will you have time to move tests and setup Travis in the new repo?

This comment has been minimized.

Copy link
@msullivan

msullivan Jan 23, 2019

Collaborator

Yeah this is because I had forgotten about this and assumed we just didn't have any tests for it. I can handle this.

@ilevkivskyi ilevkivskyi merged commit 203a588 into python:master Jan 22, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.