Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Auto-generated] Update dependencies #265

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ repos:
# More information can be found in its documentation:
# https://docs.astral.sh/ruff/
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.10
rev: v0.5.0
hooks:
- id: ruff
# Fix what can be fixed in-place and exit with non-zero status if files were
Expand All @@ -69,7 +69,7 @@ repos:
# The project's documentation can be found at:
# https://mypy.readthedocs.io/en/stable/index.html
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
rev: v1.10.1
hooks:
- id: mypy

Expand Down
29 changes: 12 additions & 17 deletions ci_cd/utils/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ def _ignore_semver_rules(
f"'patch' (you gave {semver_rules['version-update']!r})."
)

if (
return bool(
("major" in semver_rules["version-update"] and latest[0] != current[0])
or (
"minor" in semver_rules["version-update"]
Expand All @@ -745,10 +745,7 @@ def _ignore_semver_rules(
and latest[0] == current[0]
and latest[1] == current[1]
)
):
return True

return False
)


def ignore_version(
Expand Down Expand Up @@ -783,12 +780,10 @@ def ignore_version(
return True

# semver rules
if "version-update" in semver_rules and _ignore_semver_rules(
current, latest, semver_rules
):
return True

return False
return bool(
"version-update" in semver_rules
and _ignore_semver_rules(current, latest, semver_rules)
)


def regenerate_requirement(
Expand Down Expand Up @@ -1032,12 +1027,12 @@ def _semi_valid_python_version(version: SemanticVersion) -> bool:
f"Invalid Python major version: {version.major}. Expected 1, 2, or 3."
)

if version.minor not in range(12 + 1) or version.patch not in range(18 + 1):
# Either:
# Not a valid Python minor version (0, 1, 2, ..., 12)
# Not a valid Python patch version (0, 1, 2, ..., 18)
return False
return True
# Either:
# Not a valid Python minor version (0, 1, 2, ..., 12)
# Not a valid Python patch version (0, 1, 2, ..., 18)
return not bool(
version.minor not in range(12 + 1) or version.patch not in range(18 + 1)
)


def get_min_max_py_version(
Expand Down
Loading