mirror of https://github.com/pypa/pip
Address a couple strict_optional lines in req/req_install.py.
This commit is contained in:
parent
2b58bcde31
commit
0baec60bdc
|
@ -83,10 +83,10 @@ class InstallRequirement(object):
|
|||
self.req = req
|
||||
self.comes_from = comes_from
|
||||
self.constraint = constraint
|
||||
if source_dir is not None:
|
||||
self.source_dir = os.path.normpath(os.path.abspath(source_dir))
|
||||
if source_dir is None:
|
||||
self.source_dir = None # type: Optional[str]
|
||||
else:
|
||||
self.source_dir = None
|
||||
self.source_dir = os.path.normpath(os.path.abspath(source_dir))
|
||||
self.editable = editable
|
||||
|
||||
self._wheel_cache = wheel_cache
|
||||
|
@ -169,7 +169,7 @@ class InstallRequirement(object):
|
|||
s += ' in %s' % display_path(self.satisfied_by.location)
|
||||
if self.comes_from:
|
||||
if isinstance(self.comes_from, six.string_types):
|
||||
comes_from = self.comes_from
|
||||
comes_from = self.comes_from # type: Optional[str]
|
||||
else:
|
||||
comes_from = self.comes_from.from_path()
|
||||
if comes_from:
|
||||
|
|
Loading…
Reference in New Issue