peilaus alkaen https://github.com/pypa/pip
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:
vanhempi
da7569a440
commit
cf6ecab627
|
@ -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
|
||||
|
|
Ladataan…
Viittaa uudesa ongelmassa