Skip to content

Commit

Permalink
Fix import error in rookify.yaml for Python < 3.11
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Wolf <[email protected]>
  • Loading branch information
NotTheEvilOne committed Sep 17, 2024
1 parent a8177f1 commit e1261bb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/rookify/yaml.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# -*- coding: utf-8 -*-

import importlib.resources
import importlib.resources.abc
import yamale
from pathlib import Path
from typing import Any, Dict

try:
from importlib.resources.abc import Traversable
except ImportError:
# Python < 3.11
from importlib.abc import Traversable

_config_schema_file: Path | importlib.resources.abc.Traversable = Path(
_config_schema_file: Path | Traversable = Path(
"rookify", "config.schema.yaml"
)
for entry in importlib.resources.files("rookify").iterdir():
Expand Down

0 comments on commit e1261bb

Please sign in to comment.