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:
Andoni A.
2026-01-12 11:53:36 +01:00
parent 38077e9a0a
commit 21642bb5f9
@@ -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.