Skip to content

Commit

Permalink
Revert "Improve interface."
Browse files Browse the repository at this point in the history
This reverts commit 94b39a5.
  • Loading branch information
felixfontein committed Sep 27, 2023
1 parent 94b39a5 commit 1c8404e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/antsibull/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 1c8404e

Please sign in to comment.