aboutsummaryrefslogtreecommitdiff
path: root/contrib/macdeploy
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2023-10-25 00:55:17 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2023-10-25 01:10:21 +0200
commitd516cf83ed2da86dfefb395cd46f8a894907b88e (patch)
treefc6f864676dc1820a705583c9f518b694dd8a635 /contrib/macdeploy
parentd53400e75e2a4573229dba7f1a0da88eb936811c (diff)
downloadbitcoin-d516cf83ed2da86dfefb395cd46f8a894907b88e.tar.xz
test: use built-in collection types for type hints (Python 3.9 / PEP 585)
Since Python 3.9, type hinting has become a little less awkward, as for collection types one doesn't need to import the corresponding capitalized types (`Dict`, `List`, `Set`, `Tuple`, ...) anymore, but can use the built-in types directly. [1] [2] This commit applies the replacement for all Python scripts (i.e. in the contrib and test folders) for the basic types: - typing.Dict -> dict - typing.List -> list - typing.Set -> set - typing.Tuple -> tuple [1] https://docs.python.org/3.9/whatsnew/3.9.html#type-hinting-generics-in-standard-collections [2] https://peps.python.org/pep-0585/#implementation for a list of type
Diffstat (limited to 'contrib/macdeploy')
-rwxr-xr-xcontrib/macdeploy/macdeployqtplus6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus
index fa9b868349..4b1d72650d 100755
--- a/contrib/macdeploy/macdeployqtplus
+++ b/contrib/macdeploy/macdeployqtplus
@@ -20,7 +20,7 @@ import sys, re, os, platform, shutil, stat, subprocess, os.path
from argparse import ArgumentParser
from pathlib import Path
from subprocess import PIPE, run
-from typing import List, Optional
+from typing import Optional
# This is ported from the original macdeployqt with modifications
@@ -181,7 +181,7 @@ class DeploymentInfo(object):
return True
return False
-def getFrameworks(binaryPath: str, verbose: int) -> List[FrameworkInfo]:
+def getFrameworks(binaryPath: str, verbose: int) -> list[FrameworkInfo]:
if verbose:
print(f"Inspecting with otool: {binaryPath}")
otoolbin=os.getenv("OTOOL", "otool")
@@ -285,7 +285,7 @@ def copyFramework(framework: FrameworkInfo, path: str, verbose: int) -> Optional
return toPath
-def deployFrameworks(frameworks: List[FrameworkInfo], bundlePath: str, binaryPath: str, strip: bool, verbose: int, deploymentInfo: Optional[DeploymentInfo] = None) -> DeploymentInfo:
+def deployFrameworks(frameworks: list[FrameworkInfo], bundlePath: str, binaryPath: str, strip: bool, verbose: int, deploymentInfo: Optional[DeploymentInfo] = None) -> DeploymentInfo:
if deploymentInfo is None:
deploymentInfo = DeploymentInfo()