2323
2424def install (cls ):
2525 """Class decorator for installation on sys.meta_path."""
26- sys .meta_path .append (cls )
26+ sys .meta_path .append (cls () )
2727 return cls
2828
2929
@@ -54,8 +54,7 @@ class MetadataPathFinder(NullFinder):
5454 """
5555 search_template = r'{pattern}(-.*)?\.(dist|egg)-info'
5656
57- @classmethod
58- def find_distributions (cls , name = None , path = None ):
57+ def find_distributions (self , name = None , path = None ):
5958 """Return an iterable of all Distribution instances capable of
6059 loading the metadata for packages matching the name
6160 (or all names if not supplied) along the paths in the list
@@ -64,7 +63,7 @@ def find_distributions(cls, name=None, path=None):
6463 if path is None :
6564 path = sys .path
6665 pattern = '.*' if name is None else re .escape (name )
67- found = cls ._search_paths (pattern , path )
66+ found = self ._search_paths (pattern , path )
6867 return map (PathDistribution , found )
6968
7069 @classmethod
@@ -119,8 +118,7 @@ class WheelMetadataFinder(NullFinder):
119118 """
120119 search_template = r'{pattern}(-.*)?\.whl'
121120
122- @classmethod
123- def find_distributions (cls , name = None , path = None ):
121+ def find_distributions (self , name = None , path = None ):
124122 """Return an iterable of all Distribution instances capable of
125123 loading the metadata for packages matching the name
126124 (or all names if not supplied) along the paths in the list
@@ -129,7 +127,7 @@ def find_distributions(cls, name=None, path=None):
129127 if path is None :
130128 path = sys .path
131129 pattern = '.*' if name is None else re .escape (name )
132- found = cls ._search_paths (pattern , path )
130+ found = self ._search_paths (pattern , path )
133131 return map (WheelDistribution , found )
134132
135133 @classmethod
0 commit comments