While not strictly necessary thanks to the odd ABC inheritance done through
importlib._bootstrap, add the optional methods for importlib.abc.SourceLoader for completeness.
This commit is contained in:
parent
2525dc8fb6
commit
8d18907a2e
|
@ -117,6 +117,20 @@ class SourceLoader(_bootstrap.SourceLoader, ResourceLoader, ExecutionLoader):
|
|||
|
||||
"""
|
||||
|
||||
def path_mtime(self, path:str) -> int:
|
||||
"""Return the modification time for the path."""
|
||||
raise NotImplementedError
|
||||
|
||||
def set_data(self, path:str, data:bytes) -> None:
|
||||
"""Write the bytes to the path (if possible).
|
||||
|
||||
Any needed intermediary directories are to be created. If for some
|
||||
reason the file cannot be written because of permissions, fail
|
||||
silently.
|
||||
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class PyLoader(SourceLoader):
|
||||
|
||||
|
|
Loading…
Reference in New Issue