Skip to content

Commit cd9257e

Browse files
committed
Use Optional for compatibility with older python versions
Signed-off-by: Michael Ehab Mikhail <michael.ehab@hotmail.com>
1 parent 0283699 commit cd9257e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

vulntotal/datasources/vulnerablecode_local.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import logging
1111
import os
12+
from typing import Optional
1213
from urllib.parse import urljoin
1314

1415
import requests
@@ -21,7 +22,7 @@
2122
logger = logging.getLogger(__name__)
2223

2324

24-
def _is_true(val: str | None) -> bool:
25+
def _is_true(val: Optional[str]) -> bool:
2526
return (val is not None) and str(val).strip().lower() in {"1", "true", "yes", "on"}
2627

2728

0 commit comments

Comments
 (0)