1
- import abc
1
+ from abc import ABCMeta , abstractmethod
2
2
if sys .version_info >= (3 , 4 ):
3
3
from _importlib_modulespec import ModuleSpec
4
4
import sys
@@ -11,23 +11,23 @@ _Path = Union[bytes, str]
11
11
# exists in its own stub file (with ModuleSpec and ModuleType).
12
12
from _importlib_modulespec import Loader as Loader # Exported
13
13
14
- class Finder (metaclass = abc . ABCMeta ): ...
14
+ class Finder (metaclass = ABCMeta ): ...
15
15
# Technically this class defines the following method, but its subclasses
16
16
# in this module violate its signature. Since this class is deprecated, it's
17
17
# easier to simply ignore that this method exists.
18
- #@abc. abstractmethod
18
+ #@abstractmethod
19
19
#def find_module(self, fullname: str,
20
20
# path: Sequence[_Path] = None) -> Optional[Loader]: ...
21
21
22
22
class ResourceLoader (Loader ):
23
- @abc . abstractmethod
23
+ @abstractmethod
24
24
def get_data (self , path : _Path ) -> bytes : ...
25
25
26
26
class InspectLoader (Loader ):
27
27
def is_package (self , fullname : str ) -> bool : ...
28
28
def get_code (self , fullname : str ) -> Optional [types .CodeType ]: ...
29
29
def load_module (self , fullname : str ) -> types .ModuleType : ...
30
- @abc . abstractmethod
30
+ @abstractmethod
31
31
def get_source (self , fullname : str ) -> Optional [str ]: ...
32
32
if sys .version_info >= (3 , 4 ):
33
33
def exec_module (self , module : types .ModuleType ) -> None : ...
@@ -40,7 +40,7 @@ class InspectLoader(Loader):
40
40
path : str = '<string>' ) -> types .CodeType : ...
41
41
42
42
class ExecutionLoader (InspectLoader ):
43
- @abc . abstractmethod
43
+ @abstractmethod
44
44
def get_filename (self , fullname : str ) -> _Path : ...
45
45
def get_code (self , fullname : str ) -> Optional [types .CodeType ]: ...
46
46
0 commit comments