mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 13:01:56 +00:00
fix(github_actions): add Python 3.9 compatibility for type annotations
Changed return type annotation from 'str | None' to 'Optional[str]' for Python 3.9 compatibility. The union operator (|) for types is only available in Python 3.10+.
This commit is contained in:
@@ -5,7 +5,7 @@ import sys
|
||||
import tempfile
|
||||
from fnmatch import fnmatch
|
||||
from os import environ
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from alive_progress import alive_bar
|
||||
from colorama import Fore, Style
|
||||
@@ -169,7 +169,7 @@ class GithubActionsProvider(Provider):
|
||||
|
||||
return False
|
||||
|
||||
def _extract_workflow_file_from_location(self, location: dict) -> str | None:
|
||||
def _extract_workflow_file_from_location(self, location: dict) -> Optional[str]:
|
||||
"""
|
||||
Extract the workflow file path from a location object.
|
||||
Supports zizmor v1.x+ JSON format.
|
||||
|
||||
Reference in New Issue
Block a user