Skip to content

Commit

Permalink
store maximal python version used in lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ilan committed Feb 14, 2024
1 parent 71b1900 commit 4461d29
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion demisto_sdk/commands/lint/linter.py
Expand Up @@ -13,7 +13,7 @@
import docker.models.containers
import git
import requests.exceptions
from packaging.version import parse
from packaging.version import Version, parse
from wcmatch.pathlib import NEGATE, Path

from demisto_sdk.commands.common.constants import (
Expand Down Expand Up @@ -403,6 +403,14 @@ def _gather_facts(self, modules: dict) -> bool:
)
if not self._facts["python_version"]:
self._facts["python_version"] = python_version_string
else:
py_num_version = max(
Version(self._facts["python_version"]), py_num_version
)
python_version_string = (
f"{py_num_version.major}.{py_num_version.minor}"
)
self._facts["python_version"] = python_version_string

# Checking whatever *test* exists in package
self._facts["test"] = (
Expand Down

0 comments on commit 4461d29

Please sign in to comment.