Skip to content

Commit

Permalink
Merge pull request #501 from Avasam/Pass-mypy-and-link-issues
Browse files Browse the repository at this point in the history
Pass mypy and link issues
  • Loading branch information
jaraco authored Sep 11, 2024
2 parents 8b909f9 + afa39e8 commit 8c1d1fa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
4 changes: 2 additions & 2 deletions importlib_metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __str__(self) -> str:
return f"No package metadata was found for {self.name}"

@property
def name(self) -> str: # type: ignore[override]
def name(self) -> str: # type: ignore[override] # make readonly
(name,) = self.args
return name

Expand Down Expand Up @@ -281,7 +281,7 @@ class EntryPoints(tuple):

__slots__ = ()

def __getitem__(self, name: str) -> EntryPoint: # type: ignore[override]
def __getitem__(self, name: str) -> EntryPoint: # type: ignore[override] # Work with str instead of int
"""
Get the EntryPoint in self matching name.
"""
Expand Down
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,3 @@ type = [


[tool.setuptools_scm]


[tool.pytest-enabler.mypy]
# Disabled due to jaraco/skeleton#143
9 changes: 3 additions & 6 deletions tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@
from .compat.py39 import os_helper
from .compat.py312 import import_helper

try:
if sys.version_info >= (3, 9):
from importlib import resources

getattr(resources, 'files')
getattr(resources, 'as_file')
except (ImportError, AttributeError):
import importlib_resources as resources # type: ignore[import-not-found, no-redef, unused-ignore]
else:
import importlib_resources as resources


@contextlib.contextmanager
Expand Down

0 comments on commit 8c1d1fa

Please sign in to comment.