Skip to content

Commit

Permalink
Only import collections.abc in doctests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Mar 14, 2021
1 parent 60f2791 commit d176331
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion importlib_metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import functools
import itertools
import posixpath
import collections.abc
import collections

from ._compat import (
NullFinder,
Expand Down Expand Up @@ -842,6 +842,7 @@ def packages_distributions() -> Mapping[str, List[str]]:
Return a mapping of top-level packages to their
distributions.
>>> import collections.abc
>>> pkgs = packages_distributions()
>>> all(isinstance(dist, collections.abc.Sequence) for dist in pkgs.values())
True
Expand Down

0 comments on commit d176331

Please sign in to comment.