File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -1015,6 +1015,15 @@ def version(distribution_name):
10151015 return distribution (distribution_name ).version
10161016
10171017
1018+ _unique = functools .partial (
1019+ unique_everseen ,
1020+ key = operator .attrgetter ('_normalized_name' ),
1021+ )
1022+ """
1023+ Wrapper for ``distributions`` to return unique distributions by name.
1024+ """
1025+
1026+
10181027def entry_points (** params ) -> Union [EntryPoints , SelectableGroups ]:
10191028 """Return EntryPoint objects for all installed packages.
10201029
@@ -1032,10 +1041,8 @@ def entry_points(**params) -> Union[EntryPoints, SelectableGroups]:
10321041
10331042 :return: EntryPoints or SelectableGroups for all installed packages.
10341043 """
1035- norm_name = operator .attrgetter ('_normalized_name' )
1036- unique = functools .partial (unique_everseen , key = norm_name )
10371044 eps = itertools .chain .from_iterable (
1038- dist .entry_points for dist in unique (distributions ())
1045+ dist .entry_points for dist in _unique (distributions ())
10391046 )
10401047 return SelectableGroups .load (eps ).select (** params )
10411048
You can’t perform that action at this time.
0 commit comments