Bump mypy to 0.790 for Python 3.9 compat

HashError.order is now annotated as an int to allow
HashErrors.errors.sort(key=lambda e: e.order).  Alternatively we can
define a function which assert e is not None but I prefer the more
concise version, since we never raise HashError directly anyway.
This commit is contained in:
Nguyễn Gia Phong 2020-10-12 17:36:51 +07:00
부모 da7569a440
커밋 cf6ecab627
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제

파일 보기

@ -69,7 +69,7 @@ repos:
files: \.py$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.770
rev: v0.790
hooks:
- id: mypy
exclude: docs|tests

파일 보기

@ -200,7 +200,7 @@ class HashError(InstallationError):
"""
req = None # type: Optional[InstallRequirement]
head = ''
order = None # type: Optional[int]
order = -1 # type: int
def body(self):
# type: () -> str