Skip to content

Commit

Permalink
use Union instead of pipe for multiple return types
Browse files Browse the repository at this point in the history
  • Loading branch information
klmcadams committed Aug 2, 2024
1 parent a8a9b33 commit 63e626f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/reuse/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,17 @@
from io import StringIO
from os import cpu_count
from pathlib import Path, PurePath
from typing import Any, Dict, Iterable, List, NamedTuple, Optional, Set, cast
from typing import (
Any,
Dict,
Iterable,
List,
NamedTuple,
Optional,
Set,
Union,
cast,
)
from uuid import uuid4

from . import __REUSE_version__, __version__
Expand Down Expand Up @@ -284,7 +294,7 @@ def get_lint_results(
file_list: Optional[List[str]] = None,
multiprocessing: bool = cpu_count() > 1, # type: ignore
add_license_concluded: bool = False,
) -> list | Iterable[_MultiprocessingResult]:
) -> Union[list, Iterable[_MultiprocessingResult]]:
"""Get lint results based on multiprocessing and file_list."""
container = _MultiprocessingContainer(
project, do_checksum, add_license_concluded
Expand Down

0 comments on commit 63e626f

Please sign in to comment.