Update mypy 0.750 -> 0.761

This fixes some type: ignores due to typeshed update.

Newer mypy seem to ignore unannotated functions better, so add a few
minor annotations so that existing correct type:ignores make sense.
This commit is contained in:
Ran Benita
2020-01-01 14:49:59 +02:00
parent 466bbbf8e8
commit 4848bbdf9a
9 changed files with 12 additions and 18 deletions

View File

@@ -339,9 +339,7 @@ def getstatementrange_ast(
block_finder.started = source.lines[start][0].isspace()
it = ((x + "\n") for x in source.lines[start:end])
try:
# Type ignored until next mypy release.
# https://github.com/python/typeshed/commit/c0d46a20353b733befb85d8b9cc24e5b0bcd8f9a
for tok in tokenize.generate_tokens(lambda: next(it)): # type: ignore
for tok in tokenize.generate_tokens(lambda: next(it)):
block_finder.tokeneater(*tok)
except (inspect.EndOfBlock, IndentationError):
end = block_finder.last + start