Commit b762bfd3 by Mathieu Kniewallner Committed by Bjorn Neergaard

refactor: comply with mypy `truthy-bool`

parent 1bb97299
......@@ -418,7 +418,7 @@ You can specify a package in the following forms:
return [
parse_dependency_specification(
requirement=requirement,
env=self.env if isinstance(self, EnvCommand) and self.env else None,
env=self.env if isinstance(self, EnvCommand) else None,
cwd=cwd,
)
for requirement in requirements
......
......@@ -424,10 +424,7 @@ class PackageInfo:
except ValueError:
return None
info = cls._from_distribution(dist=dist)
if info:
return info
return None
return cls._from_distribution(dist=dist)
@classmethod
def from_package(cls, package: Package) -> PackageInfo:
......@@ -491,7 +488,6 @@ class PackageInfo:
# we discovered PkgInfo but no requirements were listed
assert info
info._source_type = "directory"
info._source_url = path.as_posix()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment