Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Commit 6604ec2

Browse files
committed
Fix import error in rookify.yaml for Python < 3.11
Signed-off-by: Tobias Wolf <[email protected]>
1 parent a8177f1 commit 6604ec2

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/rookify/yaml.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
# -*- coding: utf-8 -*-
22

33
import importlib.resources
4-
import importlib.resources.abc
54
import yamale
65
from pathlib import Path
76
from typing import Any, Dict
87

9-
10-
_config_schema_file: Path | importlib.resources.abc.Traversable = Path(
11-
"rookify", "config.schema.yaml"
12-
)
8+
# Use Any instead importlib.resources.abc. Traversable for Python < 3.11
9+
_config_schema_file: Any = Path("rookify", "config.schema.yaml")
1310
for entry in importlib.resources.files("rookify").iterdir():
1411
if entry.name == "config.schema.yaml":
1512
_config_schema_file = entry

0 commit comments

Comments
 (0)