Skip to content

Commit

Permalink
upgraded mypy to 0.782
Browse files Browse the repository at this point in the history
This upgraded mypy version detects additional issues which were
ignored in the previous versions.

Additionally, mypy 0.782 is compatible with Python 3.8 (which we want to
upgrade to eventually).
  • Loading branch information
mristin committed Aug 22, 2020
1 parent a4c46b0 commit 4c71136
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion icontract_lint/__init__.py
Expand Up @@ -496,12 +496,14 @@ def check_file(path: pathlib.Path) -> List[Error]:
cause = err.__cause__
assert isinstance(cause, SyntaxError)

lineno = -1 if cause.lineno is None else cause.lineno # pylint: disable=no-member

return [
Error(
identifier=ErrorID.INVALID_SYNTAX,
description=cause.msg, # pylint: disable=no-member
filename=path.as_posix(),
lineno=cause.lineno) # pylint: disable=no-member
lineno=lineno) # pylint: disable=no-member
]

lint_visitor = _LintVisitor(filename=path.as_posix())
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -43,7 +43,7 @@
extras_require={
'dev': [
# yapf: disable
'mypy==0.620',
'mypy==0.782',
'pylint==2.6.0',
'yapf==0.20.2',
'tox>=3.0.0',
Expand Down

0 comments on commit 4c71136

Please sign in to comment.