Skip to content

Pass mypy and link issues #501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions importlib_metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,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 @@ -284,7 +284,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
Loading