Skip to content

Commit e735a45

Browse files
committed
Workaround Python 3.13 removals.
So much for the deprecation policy.
1 parent df005dc commit e735a45

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

domdf_python_tools/compat/importlib_resources.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,23 @@ 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: Package, resource: 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

3838
return (files(package) / _normalize_path(resource)).open("rb")
3939

40-
def read_binary(package: Package, resource: Resource) -> bytes:
40+
def read_binary(package: "Package", resource: "Resource") -> bytes:
4141
"""
4242
Return the binary contents of the resource.
4343
"""
4444

4545
return (files(package) / _normalize_path(resource)).read_bytes()
4646

4747
def open_text(
48-
package: Package,
49-
resource: Resource,
48+
package: "Package",
49+
resource: "Resource",
5050
encoding: str = "utf-8",
5151
errors: str = "strict",
5252
) -> TextIO:
@@ -61,8 +61,8 @@ def open_text(
6161
)
6262

6363
def read_text(
64-
package: Package,
65-
resource: Resource,
64+
package: "Package",
65+
resource: "Resource",
6666
encoding: str = "utf-8",
6767
errors: str = "strict",
6868
) -> str:

0 commit comments

Comments
 (0)