1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-22 21:29:19 +00:00

Add typing in Update plugins/modules/uv_python.py

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
Mariam Ahhttouche 2026-03-07 21:45:35 +00:00 committed by GitHub
parent e221795cf8
commit dbfd881d7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -214,11 +214,11 @@ class UV:
latest_version_str, latest_path = self._get_latest_patch_release("--only-installed", "--managed-python")
return True, out, err, rc, [latest_version_str], [latest_path]
def _exec(self, python_version, command, *args, check_rc=False) -> tuple[int, str, str]:
def _exec(self, python_version: str, command, *args, check_rc=False) -> tuple[int, str, str]:
"""
Execute a uv python subcommand.
Args:
python_version (str): Python version specifier (e.g. "3.12", "3.12.3").
python_version: Python version specifier (e.g. "3.12", "3.12.3").
command (str): uv python subcommand (e.g. "install", "uninstall", "find").
*args: Additional positional arguments passed to the command.
check_rc (bool): Whether to fail if the command exits with non-zero return code.