File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
domdf_python_tools/compat Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -30,23 +30,23 @@ def _normalize_path(path: Any) -> str:
30
30
raise ValueError (f'{ path !r} must be only a file name' )
31
31
return file_name
32
32
33
- def open_binary (package : Package , resource : Resource ) -> BinaryIO :
33
+ def open_binary (package : " Package" , resource : " Resource" ) -> BinaryIO :
34
34
"""
35
35
Return a file-like object opened for binary reading of the resource.
36
36
"""
37
37
38
38
return (files (package ) / _normalize_path (resource )).open ("rb" )
39
39
40
- def read_binary (package : Package , resource : Resource ) -> bytes :
40
+ def read_binary (package : " Package" , resource : " Resource" ) -> bytes :
41
41
"""
42
42
Return the binary contents of the resource.
43
43
"""
44
44
45
45
return (files (package ) / _normalize_path (resource )).read_bytes ()
46
46
47
47
def open_text (
48
- package : Package ,
49
- resource : Resource ,
48
+ package : " Package" ,
49
+ resource : " Resource" ,
50
50
encoding : str = "utf-8" ,
51
51
errors : str = "strict" ,
52
52
) -> TextIO :
@@ -61,8 +61,8 @@ def open_text(
61
61
)
62
62
63
63
def read_text (
64
- package : Package ,
65
- resource : Resource ,
64
+ package : " Package" ,
65
+ resource : " Resource" ,
66
66
encoding : str = "utf-8" ,
67
67
errors : str = "strict" ,
68
68
) -> str :
You can’t perform that action at this time.
0 commit comments