From 1c8404e9593228db8cd92d2dc5a18e83bbd2b604 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 27 Sep 2023 18:41:07 +0200 Subject: [PATCH] Revert "Improve interface." This reverts commit 94b39a51054c59adf66218cd9402481b39b3ec1f. --- src/antsibull/versions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/antsibull/versions.py b/src/antsibull/versions.py index f7318eba..77c795d1 100644 --- a/src/antsibull/versions.py +++ b/src/antsibull/versions.py @@ -119,14 +119,14 @@ def feature_freeze_version(spec: str, collection_name: str) -> str: return _FeatureFreezeVersion(spec, collection_name).compute_new_spec() -def load_constraints_if_exists(filename: str | os.PathLike[str]) -> dict[str, SemVerSpec]: +def load_constraints_if_exists(filename: str) -> dict[str, SemVerSpec]: """ Load a constraints file, if it exists. """ result: dict[str, SemVerSpec] = {} if not os.path.exists(filename): return result - for line in parse_pieces_file(os.fspath(filename)): + for line in parse_pieces_file(filename): record = [entry.strip() for entry in line.split(":", 1)] if len(record) < 2: raise ValueError(