Skip to content

Commit

Permalink
Import sys and add docstring.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Dec 16, 2023
1 parent 74d3ac8 commit 6b4eb4d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/antsibull/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import asyncio
import os
import sys
import typing as t
from collections.abc import Mapping, Sequence

Expand Down Expand Up @@ -297,6 +298,14 @@ def find_latest_compatible(
version_specs: Mapping[str, str] | None = None,
constraints: Mapping[str, SemVerSpec] | None = None,
) -> dict[str, SemVer]:
"""
Finds the latest compatible version of every collection from ``collections_to_versions``
that matches the given ``vresion_specs`` and ``constraints``.
``pre`` and ``prefer_pre`` control whether pre-releases are acceptable (``pre=True``),
and in case both matching pre-releases and releases are found, which ones to prefer
(``prefer_pre=True`` prefers pre-releases over regular releases).
"""
# Note: ansible-core compatibility is not currently implemented. It will be a piece of
# collection metadata that is present in the collection but may not be present in Galaxy.
# We'll have to figure that out once the pieces are finalized
Expand Down

0 comments on commit 6b4eb4d

Please sign in to comment.