Skip to content

Call mypy with newly added parameter flush_errors - #7

Merged
dbader merged 2 commits into
realpython:masterfrom
petr-muller:flush-errors
Mar 16, 2018
Merged

dbader merged 2 commits into
realpython:masterfrom
petr-muller:flush-errors

Conversation

@petr-muller

Copy link
Copy Markdown
Contributor

Unfortunately the target function does not have any docstring in mypy,
but it is typed as Optional[] which means the function should accept
None as a value. Doing so seems to suppress issues reported in #6.

Quick skim of the culprit PR in mypy
(https://github.com/python/mypy/pull/4396/files) shows the code really
counts with None being passed and adjusting appropriately, citing:

If we were not given a flush_errors, we use one that will populate
those fields for callers that want the traditional API.

@petr-muller

petr-muller commented Mar 5, 2018 •

Copy link
Copy Markdown
Contributor Author

It's only the Python 3.3 that failed. Given that mypy itself now needs at least Python 3.4 to run, it seems that can be safely removed actually from Travis setup and other places. I will submit another commit for that.

Unfortunately the target function does not have any docstring in mypy,
but it is typed as Optional[] which means the function should accept
None as a value. Doing so seems to suppress issues reported in realpython#6.

Quick skim of the culprit PR in mypy
(https://github.com/python/mypy/pull/4396/files) shows the code really
counts with None being passed and adjusting appropriately, citing:

> If we were not given a flush_errors, we use one that will populate
> those fields for callers that want the traditional API.
Mypy itself needs Python 3.4 at least, citing it's README.md:

> You need Python 3.4 or later to run mypy
@marcintustin

Copy link
Copy Markdown

Please please please can we get this merged and released ASAP?

@dmtucker dmtucker mentioned this pull request Mar 7, 2018
@kennethreitz

Copy link
Copy Markdown

👍

@dbader

dbader commented Mar 16, 2018

Copy link
Copy Markdown
Member

LGTM, thanks guys. I'm so swamped right now with other stuff—anybody interested in becoming a collaborator on this repo and helping out with maintaining this thing?

@dbader
dbader merged commit f4f77b3 into realpython:master Mar 16, 2018
@dmtucker dmtucker added this to the 0.3.1 milestone Jun 11, 2019
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.

7 participants