Add mypy annotations to pip._internal.req.req_set

This commit is contained in:
Devesh Kumar Singh 2020-05-22 01:51:20 +05:30
parent ea3aa04987
commit 311eb48ca5
1 changed files with 2 additions and 4 deletions

View File

@ -1,6 +1,3 @@
# The following comment should be removed at some point in the future.
# mypy: strict-optional=False
from __future__ import absolute_import
import logging
@ -122,7 +119,8 @@ class RequirementSet(object):
return [install_req], None
try:
existing_req = self.get_requirement(install_req.name)
existing_req = self.get_requirement(
install_req.name) # type: Optional[InstallRequirement]
except KeyError:
existing_req = None