File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
domdf_python_tools/compat Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -30,39 +30,39 @@ def _normalize_path(path: Any) -> str:
3030 raise ValueError (f'{ path !r} must be only a file name' )
3131 return file_name
3232
33- def open_binary (package : importlib_resources . Package , resource : importlib_resources . Resource ) -> BinaryIO :
33+ def open_binary (package : Package , resource : Resource ) -> BinaryIO :
3434 """
3535 Return a file-like object opened for binary reading of the resource.
3636 """
3737
38- return (importlib_resources . files (package ) / _normalize_path (resource )).open ("rb" )
38+ return (files (package ) / _normalize_path (resource )).open ("rb" )
3939
40- def read_binary (package : importlib_resources . Package , resource : importlib_resources . Resource ) -> bytes :
40+ def read_binary (package : Package , resource : Resource ) -> bytes :
4141 """
4242 Return the binary contents of the resource.
4343 """
4444
45- return (importlib_resources . files (package ) / _normalize_path (resource )).read_bytes ()
45+ return (files (package ) / _normalize_path (resource )).read_bytes ()
4646
4747 def open_text (
48- package : importlib_resources . Package ,
49- resource : importlib_resources . Resource ,
48+ package : Package ,
49+ resource : Resource ,
5050 encoding : str = "utf-8" ,
5151 errors : str = "strict" ,
5252 ) -> TextIO :
5353 """
5454 Return a file-like object opened for text reading of the resource.
5555 """
5656
57- return (importlib_resources . files (package ) / _normalize_path (resource )).open (
57+ return (files (package ) / _normalize_path (resource )).open (
5858 'r' ,
5959 encoding = encoding ,
6060 errors = errors ,
6161 )
6262
6363 def read_text (
64- package : importlib_resources . Package ,
65- resource : importlib_resources . Resource ,
64+ package : Package ,
65+ resource : Resource ,
6666 encoding : str = "utf-8" ,
6767 errors : str = "strict" ,
6868 ) -> str :
You can’t perform that action at this time.
0 commit comments