Skip to content

Commit

Permalink
Keep _ModuleLike not Any
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Jun 17, 2024
1 parent a9d4e1f commit ad033e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg_resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@
_ResolvedEntryPoint = Any # Can be any attribute in the module
_ResourceStream = Any # TODO / Incomplete: A readable file-like object
# Any object works, but let's indicate we expect something like a module (optionally has __loader__ or __file__)
_ModuleLike = Any
_ProviderFactoryType = Callable[[_ModuleLike], "IResourceProvider"]
_ModuleLike = Union[object, types.ModuleType]
# Any: Should be _ModuleLike but we end up with issues where _ModuleLike doesn't have _ZipLoaderModule's __loader__
_ProviderFactoryType = Callable[[Any], "IResourceProvider"]
_DistFinderType = Callable[[_T, str, bool], Iterable["Distribution"]]
_NSHandlerType = Callable[[_T, str, str, types.ModuleType], Union[str, None]]
_AdapterT = TypeVar(
Expand Down

0 comments on commit ad033e8

Please sign in to comment.