From 8b214aab3da22428704924a6e90192e4df351343 Mon Sep 17 00:00:00 2001 From: Semantic Versioner Date: Sat, 22 Jul 2023 05:11:03 -0400 Subject: [PATCH] GitHub Actions Iterations --- semver/scm/git.py | 6 +++--- semver/utils.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/semver/scm/git.py b/semver/scm/git.py index 4b9a620..80f76d4 100644 --- a/semver/scm/git.py +++ b/semver/scm/git.py @@ -1,7 +1,7 @@ import re import subprocess from typing import Union, List -from functools import cache +from functools import lru_cache import toml @@ -88,7 +88,7 @@ class Git(SCM): logger.debug(f"Tag Version: {version}") return version - @cache + @lru_cache(maxsize=None) def get_branch(self) -> str: """ Get the main branch @@ -97,7 +97,7 @@ class Git(SCM): proc = self._run_command(self.git_bin, "rev-parse", "--abbrev-ref", "HEAD") return proc.stdout.rstrip() - @cache + @lru_cache(maxsize=None) def get_merge_branch(self) -> Union[str, None]: """ Get the branches involved in the merge diff --git a/semver/utils.py b/semver/utils.py index 82955b8..c155470 100644 --- a/semver/utils.py +++ b/semver/utils.py @@ -1,6 +1,6 @@ from typing import List from pathlib import Path -from functools import cache +from functools import lru_cache import configparser import toml @@ -8,7 +8,7 @@ import toml from semver.exceptions import SemverException -@cache +@lru_cache(maxsize=None) def get_settings() -> dict: """ Get the settings from the config file