Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
ansible-core-version: ["2.16.14"]
runs-on: "ubuntu-latest"
env:
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
ansible-core-version: ["2.16.14"]
runs-on: "ubuntu-latest"
env:
Expand Down
8 changes: 4 additions & 4 deletions schema_enforcer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import glob
from collections.abc import Mapping, Sequence
import importlib
from urllib import parse as urlparse

from ruamel.yaml import YAML
from ruamel.yaml.scalarstring import DoubleQuotedScalarString as DQ
Expand Down Expand Up @@ -374,10 +375,9 @@ def load_file(filename, file_type=None):
if not file_type:
file_type = "json" if filename.endswith(".json") else "yaml"

# When called from JsonRef, filename will contain a URI not just a local file,
# but this function only handles local files. See jsonref.JsonLoader for a fuller implementation
if filename.startswith("file:///"):
filename = filename.replace("file://", "")
# When called from JsonRef, filename will contain a file URI not just a local path
if filename.startswith("file:"):
filename = urlparse.urlparse(filename).path

handler = YAML_HANDLER if file_type == "yaml" else json
with open(filename, "r", encoding="utf-8") as fileh:
Expand Down
Loading