Skip to content

Commit

Permalink
FIX: set py37 as target version if undetermined (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer authored Apr 5, 2024
1 parent 9e29c23 commit e53735f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/compwa_policy/check_dev_files/ruff.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ def ___get_target_version(pyproject: Pyproject) -> str:
supported_python_versions = pyproject.get_supported_python_versions()
versions = {f'py{v.replace(".", "")}' for v in supported_python_versions}
versions &= {"py37", "py38", "py39", "py310", "py311", "py312"}
if not versions:
return "py37"
lowest_version, *_ = sorted(versions, key=natural_sorting)
return lowest_version

Expand Down

0 comments on commit e53735f

Please sign in to comment.