Skip to content

Commit f666bc1

Browse files
committed
Use Optional to support Python 3.9 #1904
Signed-off-by: Michael Ehab Mikhail <michael.ehab@hotmail.com>
1 parent c2e47ca commit f666bc1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vulnerabilities/pipelines/v2_importers/github_osv_live_importer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import json
22
from typing import Iterable
3+
from typing import Optional
34

45
import requests
56
from packageurl import PackageURL
@@ -126,7 +127,7 @@ def collect_advisories(self) -> Iterable[AdvisoryData]:
126127
}
127128

128129

129-
def build_github_repo_advisory_url(adv: dict, adv_id: str | None) -> str:
130+
def build_github_repo_advisory_url(adv: dict, adv_id: Optional[str]) -> str:
130131
"""
131132
Return the advisory JSON URL in the GitHub advisory-database repo, using the GHSA path:
132133
advisories/github-reviewed/YYYY/MM/GHSA-ID/GHSA-ID.json

0 commit comments

Comments
 (0)