Commit f33c9db2 by Branch Vincent Committed by Bjorn Neergaard

chore(repositories): remove type errors

parent ed26721c
......@@ -123,7 +123,6 @@ module = [
'poetry.installation.executor',
'poetry.installation.installer',
'poetry.installation.pip_installer',
'poetry.repositories.installed_repository',
'poetry.utils.env',
]
ignore_errors = true
......
......@@ -103,7 +103,7 @@ class InstalledRepository(Repository):
) -> Package:
# We first check for a direct_url.json file to determine
# the type of package.
path = Path(str(distribution._path))
path = Path(str(distribution._path)) # type: ignore[attr-defined]
if (
path.name.endswith(".dist-info")
......@@ -169,7 +169,7 @@ class InstalledRepository(Repository):
@classmethod
def create_package_from_pep610(cls, distribution: metadata.Distribution) -> Package:
path = Path(str(distribution._path))
path = Path(str(distribution._path)) # type: ignore[attr-defined]
source_type = None
source_url = None
source_reference = None
......@@ -230,14 +230,14 @@ class InstalledRepository(Repository):
for entry in reversed(env.sys_path):
for distribution in sorted(
metadata.distributions(path=[entry]),
key=lambda d: str(d._path),
key=lambda d: str(d._path), # type: ignore[attr-defined]
):
name = canonicalize_name(distribution.metadata["name"])
if name in seen:
continue
path = Path(str(distribution._path))
path = Path(str(distribution._path)) # type: ignore[attr-defined]
try:
path.relative_to(_VENDORS)
......
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