aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2020-01-06 15:27:38 +0100
committerDaniel Mensinger <daniel@mensinger-ka.de>2020-01-08 15:28:17 +0100
commit09b53c534f74806ebc49bb2fcdfbae0e3b26fb84 (patch)
tree4466a6005333d6d1ae7d67cbaf24fb63e104df6a /mesonbuild/backend
parentf3199edaf8802e2a59fed2f83e825e09b9d4bd0d (diff)
downloadmeson-09b53c534f74806ebc49bb2fcdfbae0e3b26fb84.zip
meson-09b53c534f74806ebc49bb2fcdfbae0e3b26fb84.tar.gz
meson-09b53c534f74806ebc49bb2fcdfbae0e3b26fb84.tar.bz2
types: import typing as T (fixes #6333)
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r--mesonbuild/backend/backends.py14
-rw-r--r--mesonbuild/backend/ninjabackend.py6
2 files changed, 10 insertions, 10 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index e548096..2a07058 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -27,7 +27,7 @@ from ..compilers import CompilerArgs, VisualStudioLikeCompiler
from collections import OrderedDict
import shlex
from functools import lru_cache
-import typing
+import typing as T
class CleanTrees:
@@ -81,12 +81,12 @@ class ExecutableSerialisation:
self.capture = capture
class TestSerialisation:
- def __init__(self, name: str, project: str, suite: str, fname: typing.List[str],
- is_cross_built: bool, exe_wrapper: typing.Optional[build.Executable],
- needs_exe_wrapper: bool, is_parallel: bool, cmd_args: typing.List[str],
+ def __init__(self, name: str, project: str, suite: str, fname: T.List[str],
+ is_cross_built: bool, exe_wrapper: T.Optional[build.Executable],
+ needs_exe_wrapper: bool, is_parallel: bool, cmd_args: T.List[str],
env: build.EnvironmentVariables, should_fail: bool,
- timeout: typing.Optional[int], workdir: typing.Optional[str],
- extra_paths: typing.List[str], protocol: str, priority: int):
+ timeout: T.Optional[int], workdir: T.Optional[str],
+ extra_paths: T.List[str], protocol: str, priority: int):
self.name = name
self.project_name = project
self.suite = suite
@@ -676,7 +676,7 @@ class Backend:
paths.update(cc.get_library_dirs(self.environment))
return list(paths)
- def determine_windows_extra_paths(self, target: typing.Union[build.BuildTarget, str], extra_bdeps):
+ def determine_windows_extra_paths(self, target: T.Union[build.BuildTarget, str], extra_bdeps):
'''On Windows there is no such thing as an rpath.
We must determine all locations of DLLs that this exe
links to and return them so they can be used in unit
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 824b958..31a7a43 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-from typing import List
+import typing as T
import os
import re
import pickle
@@ -1872,7 +1872,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
self.fortran_deps[target.get_basename()] = {**module_files, **submodule_files}
- def get_fortran_deps(self, compiler: FortranCompiler, src: Path, target) -> List[str]:
+ def get_fortran_deps(self, compiler: FortranCompiler, src: Path, target) -> T.List[str]:
"""
Find all module and submodule needed by a Fortran target
"""
@@ -2795,7 +2795,7 @@ def load(build_dir):
return obj
-def _scan_fortran_file_deps(src: Path, srcdir: Path, dirname: Path, tdeps, compiler) -> List[str]:
+def _scan_fortran_file_deps(src: Path, srcdir: Path, dirname: Path, tdeps, compiler) -> T.List[str]:
"""
scan a Fortran file for dependencies. Needs to be distinct from target
to allow for recursion induced by `include` statements.er