Commit f33c9db2 by Branch Vincent Committed by Bjorn Neergaard

chore(repositories): remove type errors

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