third_party/fuchsia: Replace list with typing.List
Use typing.List[] in place of list[] which is not supported by
Python 3.8.
Change-Id: Id3bd3dab788e78ceac19e50e46f2aeef49184248
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/111532
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
diff --git a/third_party/fuchsia/generate_fuchsia_patch.py b/third_party/fuchsia/generate_fuchsia_patch.py
index adbe3be..0eb1a2d 100755
--- a/third_party/fuchsia/generate_fuchsia_patch.py
+++ b/third_party/fuchsia/generate_fuchsia_patch.py
@@ -21,7 +21,7 @@
import re
import subprocess
import tempfile
-from typing import Iterable, TextIO, Optional, Union
+from typing import Iterable, List, TextIO, Optional, Union
from datetime import datetime
PathOrStr = Union[Path, str]
@@ -73,9 +73,10 @@
return temp_path / 'fuchsia'
-def _read_files(script: Path) -> list[Path]:
+# TODO(b/248257406): Replace typing.List with list. # pylint: disable=fixme
+def _read_files(script: Path) -> List[Path]:
with script.open() as file:
- paths_list: list[str] = eval(''.join(_read_files_list(file))) # pylint: disable=eval-used
+ paths_list: List[str] = eval(''.join(_read_files_list(file))) # pylint: disable=eval-used
return list(Path(p) for p in paths_list if not 'lib/stdcompat/' in p)