From dbc281dc65d566bcab63d5a76f68363917c0ddd6 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 7 Jul 2025 12:42:03 -0500 Subject: [PATCH 01/11] Implement get_wg_info for CL_KERNEL_GLOBAL_WORK_SIZE --- src/wrap_cl.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wrap_cl.hpp b/src/wrap_cl.hpp index d61f3d546..743bbe9b2 100644 --- a/src/wrap_cl.hpp +++ b/src/wrap_cl.hpp @@ -5085,6 +5085,7 @@ namespace pyopencl PYOPENCL_GET_TYPED_INFO(KernelWorkGroup, PYOPENCL_FIRST_ARG, param_name, size_t); + case CL_KERNEL_GLOBAL_WORK_SIZE: case CL_KERNEL_COMPILE_WORK_GROUP_SIZE: { std::vector result; From ca4c68026ed5a5cdf27ffc2c619482dceb97c157 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 7 Jul 2025 12:43:14 -0500 Subject: [PATCH 02/11] Add return types of kernel_get_work_group_info by param --- pyopencl/_cl.pyi | 12 +++++----- pyopencl/_monkeypatch.py | 39 ++++++++++++++++++++++++++++++- pyopencl/array.py | 3 +-- pyopencl/characterize/__init__.py | 6 ++--- 4 files changed, 47 insertions(+), 13 deletions(-) diff --git a/pyopencl/_cl.pyi b/pyopencl/_cl.pyi index 20964ec88..e00ddc665 100644 --- a/pyopencl/_cl.pyi +++ b/pyopencl/_cl.pyi @@ -591,12 +591,12 @@ class kernel_arg_type_qualifier(IntEnum): # noqa: N801 to_string = classmethod(pyopencl._monkeypatch.to_string) class kernel_work_group_info(IntEnum): # noqa: N801 - WORK_GROUP_SIZE = auto() - COMPILE_WORK_GROUP_SIZE = auto() - LOCAL_MEM_SIZE = auto() - PREFERRED_WORK_GROUP_SIZE_MULTIPLE = auto() - PRIVATE_MEM_SIZE = auto() - GLOBAL_WORK_SIZE = auto() + WORK_GROUP_SIZE = 0x11B0 + COMPILE_WORK_GROUP_SIZE = 0x11B1 + LOCAL_MEM_SIZE = 0x11B2 + PREFERRED_WORK_GROUP_SIZE_MULTIPLE = 0x11B3 + PRIVATE_MEM_SIZE = 0x11B4 + GLOBAL_WORK_SIZE = 0x11B5 to_string = classmethod(pyopencl._monkeypatch.to_string) class kernel_sub_group_info(IntEnum): # noqa: N801 diff --git a/pyopencl/_monkeypatch.py b/pyopencl/_monkeypatch.py index 93748be9a..2bcc5df5f 100644 --- a/pyopencl/_monkeypatch.py +++ b/pyopencl/_monkeypatch.py @@ -27,9 +27,11 @@ from typing import ( TYPE_CHECKING, Any, + Literal, TextIO, TypeVar, cast, + overload, ) from warnings import warn @@ -259,7 +261,42 @@ def kernel_set_arg_types(self: _cl.Kernel, arg_types): devs=self.context.devices)) -def kernel_get_work_group_info(self: _cl.Kernel, param: int, device: _cl.Device): +@overload +def kernel_get_work_group_info( + self: _cl.Kernel, + param: Literal[ + _cl.kernel_work_group_info.WORK_GROUP_SIZE, + _cl.kernel_work_group_info.PREFERRED_WORK_GROUP_SIZE_MULTIPLE, + _cl.kernel_work_group_info.LOCAL_MEM_SIZE, + _cl.kernel_work_group_info.PRIVATE_MEM_SIZE, + ], + device: _cl.Device + ) -> int: ... + +@overload +def kernel_get_work_group_info( + self: _cl.Kernel, + param: Literal[ + _cl.kernel_work_group_info.COMPILE_WORK_GROUP_SIZE, + _cl.kernel_work_group_info.GLOBAL_WORK_SIZE, + ], + device: _cl.Device + ) -> Sequence[int]: ... + + +@overload +def kernel_get_work_group_info( + self: _cl.Kernel, + param: int, + device: _cl.Device + ) -> object: ... + + +def kernel_get_work_group_info( + self: _cl.Kernel, + param: int, + device: _cl.Device + ) -> object: try: wg_info_cache = self._wg_info_cache except AttributeError: diff --git a/pyopencl/array.py b/pyopencl/array.py index 9739c2ff6..3c29a13ff 100644 --- a/pyopencl/array.py +++ b/pyopencl/array.py @@ -244,10 +244,9 @@ def kernel_runner(out: Array, *args: P.args, **kwargs: P.kwargs) -> cl.Event: assert queue is not None knl = kernel_getter(out, *args, **kwargs) - work_group_info = cast("int", knl.get_work_group_info( + gs, ls = out._get_sizes(queue, knl.get_work_group_info( cl.kernel_work_group_info.WORK_GROUP_SIZE, queue.device)) - gs, ls = out._get_sizes(queue, work_group_info) knl_args = (out, *args, out.size) if ARRAY_KERNEL_EXEC_HOOK is not None: diff --git a/pyopencl/characterize/__init__.py b/pyopencl/characterize/__init__.py index bf2a883ef..45c7ef06a 100644 --- a/pyopencl/characterize/__init__.py +++ b/pyopencl/characterize/__init__.py @@ -24,8 +24,6 @@ """ -from typing import cast - from pytools import memoize import pyopencl as cl @@ -70,9 +68,9 @@ def reasonable_work_group_size_multiple( } """) prg.build() - return cast("int", prg.knl.get_work_group_info( + return prg.knl.get_work_group_info( cl.kernel_work_group_info.PREFERRED_WORK_GROUP_SIZE_MULTIPLE, - dev)) + dev) def nv_compute_capability(dev: cl.Device): From 9b5f7c9ea54cf8963a1f38a66516a1179f78ab74 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Sat, 5 Jul 2025 11:10:50 +0300 Subject: [PATCH 03/11] feat(typing): finish typing cltypes.py --- pyopencl/cltypes.py | 69 +++++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 27 deletions(-) diff --git a/pyopencl/cltypes.py b/pyopencl/cltypes.py index 6e4d411d1..19a17f52a 100644 --- a/pyopencl/cltypes.py +++ b/pyopencl/cltypes.py @@ -22,13 +22,17 @@ """ import warnings -from typing import Any +from typing import TYPE_CHECKING, Any, cast import numpy as np from pyopencl.tools import get_or_register_dtype +if TYPE_CHECKING: + import builtins + from collections.abc import MutableSequence + if __file__.endswith("array.py"): warnings.warn( "pyopencl.array.vec is deprecated. Please use pyopencl.cltypes.", @@ -53,16 +57,19 @@ # {{{ vector types -def _create_vector_types(): +def _create_vector_types() -> tuple[ + dict[tuple[np.dtype[Any], builtins.int], np.dtype[Any]], + dict[np.dtype[Any], tuple[np.dtype[Any], builtins.int]]]: mapping = [(k, globals()[k]) for k in ["char", "uchar", "short", "ushort", "int", "uint", "long", "ulong", "float", "double"]] - def set_global(key, val): + def set_global(key: str, val: np.dtype[Any]) -> None: globals()[key] = val - vec_types = {} - vec_type_to_scalar_and_count = {} + vec_types: dict[tuple[np.dtype[Any], builtins.int], np.dtype[Any]] = {} + vec_type_to_scalar_and_count: dict[np.dtype[Any], + tuple[np.dtype[Any], builtins.int]] = {} field_names = ["x", "y", "z", "w"] @@ -70,20 +77,21 @@ def set_global(key, val): for base_name, base_type in mapping: for count in counts: - name = "%s%d" % (base_name, count) - - titles = field_names[:count] + name = f"{base_name}{count}" + titles = cast("MutableSequence[str | None]", field_names[:count]) padded_count = count if count == 3: padded_count = 4 - names = ["s%d" % i for i in range(count)] + names = [f"s{i}" for i in range(count)] while len(names) < padded_count: - names.append("padding%d" % (len(names) - count)) + pad = len(names) - count + names.append(f"padding{pad}") if len(titles) < len(names): - titles.extend((len(names) - len(titles)) * [None]) + pad = len(names) - len(titles) + titles.extend([None] * pad) try: dtype = np.dtype({ @@ -96,14 +104,16 @@ def set_global(key, val): for (n, title) in zip(names, titles, strict=True)]) except TypeError: - dtype = np.dtype([(n, base_type) for (n, title) - in zip(names, titles, strict=True)]) + dtype = np.dtype([(n, base_type) for n in names]) + assert isinstance(dtype, np.dtype) get_or_register_dtype(name, dtype) - set_global(name, dtype) - def create_array(dtype, count, padded_count, *args, **kwargs): + def create_array(dtype: np.dtype[Any], + count: int, + padded_count: int, + *args: Any, **kwargs: Any) -> dict[str, Any]: if len(args) < count: from warnings import warn warn("default values for make_xxx are deprecated;" @@ -116,21 +126,26 @@ def create_array(dtype, count, padded_count, *args, **kwargs): {"array": np.array, "padded_args": padded_args, "dtype": dtype}) - for key, val in list(kwargs.items()): + + for key, val in kwargs.items(): array[key] = val + return array - set_global("make_" + name, eval( - "lambda *args, **kwargs: create_array(dtype, %i, %i, " - "*args, **kwargs)" % (count, padded_count), - {"create_array": create_array, "dtype": dtype})) - set_global("filled_" + name, eval( - "lambda val: make_%s(*[val]*%i)" % (name, count))) - set_global("zeros_" + name, eval("lambda: filled_%s(0)" % (name))) - set_global("ones_" + name, eval("lambda: filled_%s(1)" % (name))) - - vec_types[np.dtype(base_type), count] = dtype - vec_type_to_scalar_and_count[dtype] = np.dtype(base_type), count + set_global( + f"make_{name}", + eval("lambda *args, **kwargs: " + f"create_array(dtype, {count}, {padded_count}, *args, **kwargs)", + {"create_array": create_array, "dtype": dtype})) + set_global( + f"filled_{name}", + eval(f"lambda val: make_{name}(*[val]*{count})")) + set_global(f"zeros_{name}", eval(f"lambda: filled_{name}(0)")) + set_global(f"ones_{name}", eval(f"lambda: filled_{name}(1)")) + + base_dtype = np.dtype(base_type) + vec_types[base_dtype, count] = dtype + vec_type_to_scalar_and_count[dtype] = base_dtype, count return vec_types, vec_type_to_scalar_and_count From 53e262ffd90b9118b29a7aaf5227c928e7b05079 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Sat, 5 Jul 2025 11:13:50 +0300 Subject: [PATCH 04/11] feat(typing): finish typing tools.py --- pyopencl/tools.py | 498 ++++++++++++++++++++++++++++------------------ 1 file changed, 302 insertions(+), 196 deletions(-) diff --git a/pyopencl/tools.py b/pyopencl/tools.py index 83d1635ae..2b9599b1a 100644 --- a/pyopencl/tools.py +++ b/pyopencl/tools.py @@ -128,7 +128,7 @@ OTHER DEALINGS IN THE SOFTWARE. """ - +import atexit import re from abc import ABC, abstractmethod from dataclasses import dataclass @@ -136,15 +136,20 @@ from typing import ( TYPE_CHECKING, Any, + ClassVar, Concatenate, ParamSpec, + TypeAlias, + TypedDict, TypeVar, + cast, + overload, ) import numpy as np from typing_extensions import TypeIs, override -from pytools import memoize, memoize_method +from pytools import Hash, memoize, memoize_method from pytools.persistent_dict import KeyBuilder as KeyBuilderBase from pyopencl._cl import bitlog2, get_cl_header_version @@ -157,10 +162,10 @@ if TYPE_CHECKING: - from collections.abc import Callable, Hashable, Sequence - - from numpy.typing import DTypeLike + from collections.abc import Callable, Hashable, Iterator, Mapping, Sequence + from numpy.typing import DTypeLike, NDArray + from pytest import Metafunc # Do not add a pyopencl import here: This will add an import cycle. @@ -373,7 +378,7 @@ def _monkeypatch_svm_docstrings(): # {{{ PooledSVM - PooledSVM.__doc__ = ( + PooledSVM.__doc__ = ( # pyright: ignore[reportPossiblyUnboundVariable] """An object representing a :class:`SVMPool`-based allocation of :ref:`svm`. Analogous to :class:`~pyopencl.SVMAllocation`, however once this object is deleted, its associated device memory is returned to the @@ -420,7 +425,7 @@ def _monkeypatch_svm_docstrings(): # {{{ SVMAllocator - SVMAllocator.__doc__ = ( + SVMAllocator.__doc__ = ( # pyright: ignore[reportPossiblyUnboundVariable] """ .. versionadded:: 2022.2 @@ -453,7 +458,7 @@ def _monkeypatch_svm_docstrings(): # {{{ SVMPool - SVMPool.__doc__ = ( + SVMPool.__doc__ = ( # pyright: ignore[reportPossiblyUnboundVariable] remove_common_indentation(""" A memory pool for OpenCL device memory in :ref:`SVM ` form. *allocator* must be an instance of :class:`SVMAllocator`. @@ -477,7 +482,7 @@ def _monkeypatch_svm_docstrings(): # {{{ first-arg caches -_first_arg_dependent_caches: list[dict[Hashable, object]] = [] +_first_arg_dependent_caches: list[Mapping[Hashable, object]] = [] RetT = TypeVar("RetT") @@ -485,8 +490,8 @@ def _monkeypatch_svm_docstrings(): def first_arg_dependent_memoize( - func: Callable[Concatenate[object, P], RetT] - ) -> Callable[Concatenate[object, P], RetT]: + func: Callable[Concatenate[Hashable, P], RetT] + ) -> Callable[Concatenate[Hashable, P], RetT]: def wrapper(cl_object: Hashable, *args: P.args, **kwargs: P.kwargs) -> RetT: """Provides memoization for a function. Typically used to cache things that get created inside a :class:`pyopencl.Context`, e.g. programs @@ -527,33 +532,41 @@ def wrapper(cl_object: Hashable, *args: P.args, **kwargs: P.kwargs) -> RetT: context_dependent_memoize = first_arg_dependent_memoize -def first_arg_dependent_memoize_nested(nested_func): - """Provides memoization for nested functions. Typically used to cache - things that get created inside a :class:`pyopencl.Context`, e.g. programs - and kernels. Assumes that the first argument of the decorated function is - an OpenCL object that might go away, such as a :class:`pyopencl.Context` or - a :class:`pyopencl.CommandQueue`, and will therefore respond to - :func:`clear_first_arg_caches`. +def first_arg_dependent_memoize_nested( + nested_func: Callable[Concatenate[Hashable, P], RetT] + ) -> Callable[Concatenate[Hashable, P], RetT]: + """Provides memoization for nested functions. + + Typically used to cache things that get created inside a + :class:`pyopencl.Context`, e.g. programs and kernels. Assumes that the first + argument of the decorated function is an OpenCL object that might go away, + such as a :class:`pyopencl.Context` or a :class:`pyopencl.CommandQueue`, and + will therefore respond to :func:`clear_first_arg_caches`. .. versionadded:: 2013.1 """ from functools import wraps - cache_dict_name = intern("_memoize_inner_dic_%s_%s_%d" - % (nested_func.__name__, nested_func.__code__.co_filename, - nested_func.__code__.co_firstlineno)) + cache_dict_name = intern( + f"_memoize_inner_dic_{nested_func.__name__}_" + f"{nested_func.__code__.co_filename}_" + f"{nested_func.__code__.co_firstlineno}") from inspect import currentframe # prevent ref cycle - try: - caller_frame = currentframe().f_back - cache_context = caller_frame.f_globals[ - caller_frame.f_code.co_name] - finally: - # del caller_frame - pass - + frame = currentframe() + cache_context = None + if frame: + try: + caller_frame = frame.f_back + if caller_frame: + cache_context = caller_frame.f_globals[caller_frame.f_code.co_name] + finally: + # del caller_frame + pass + + cache_dict: dict[Hashable, dict[Hashable, RetT]] try: cache_dict = getattr(cache_context, cache_dict_name) except AttributeError: @@ -562,12 +575,14 @@ def first_arg_dependent_memoize_nested(nested_func): setattr(cache_context, cache_dict_name, cache_dict) @wraps(nested_func) - def new_nested_func(cl_object, *args): + def new_nested_func(cl_object: Hashable, *args: P.args, **kwargs: P.kwargs) -> RetT: + assert not kwargs + try: return cache_dict[cl_object][args] except KeyError: arg_dict = cache_dict.setdefault(cl_object, {}) - result = nested_func(cl_object, *args) + result = nested_func(cl_object, *args, **kwargs) arg_dict[args] = result return result @@ -575,23 +590,24 @@ def new_nested_func(cl_object, *args): def clear_first_arg_caches(): - """Empties all first-argument-dependent memoization caches. Also releases - all held reference contexts. If it is important to you that the - program detaches from its context, you might need to call this - function to free all remaining references to your context. + """Empties all first-argument-dependent memoization caches. + + Also releases all held reference contexts. If it is important to you that the + program detaches from its context, you might need to call this function to + free all remaining references to your context. .. versionadded:: 2011.2 """ for cache in _first_arg_dependent_caches: - cache.clear() - - -import atexit + # NOTE: this could be fixed by making the caches a MutableMapping, but + # that doesn't seem to be correctly covariant in its values, so other + # parts fail to work nicely.. + cache.clear() # pyright: ignore[reportAttributeAccessIssue,reportUnknownMemberType] if TYPE_CHECKING: import pyopencl as cl - + from pyopencl.array import Array as CLArray atexit.register(clear_first_arg_caches) @@ -690,7 +706,9 @@ def get_test_platforms_and_devices( for platform in cl.get_platforms()] -def get_pyopencl_fixture_arg_names(metafunc, extra_arg_names=None): +def get_pyopencl_fixture_arg_names( + metafunc: Metafunc, + extra_arg_names: list[str] | None = None) -> list[str]: if extra_arg_names is None: extra_arg_names = [] @@ -700,7 +718,7 @@ def get_pyopencl_fixture_arg_names(metafunc, extra_arg_names=None): *extra_arg_names ] - arg_names = [] + arg_names: list[str] = [] for arg in supported_arg_names: if arg not in metafunc.fixturenames: continue @@ -716,10 +734,11 @@ def get_pyopencl_fixture_arg_names(metafunc, extra_arg_names=None): return arg_names -def get_pyopencl_fixture_arg_values(): +def get_pyopencl_fixture_arg_values() -> tuple[list[dict[str, Any]], + Callable[[Any], str]]: import pyopencl as cl - arg_values = [] + arg_values: list[dict[str, Any]] = [] for platform, devices in get_test_platforms_and_devices(): for device in devices: arg_dict = { @@ -730,7 +749,7 @@ def get_pyopencl_fixture_arg_values(): } arg_values.append(arg_dict) - def idfn(val): + def idfn(val: Any) -> str: if isinstance(val, cl.Platform): # Don't show address, so that parallel test collection works return f"" @@ -740,7 +759,7 @@ def idfn(val): return arg_values, idfn -def pytest_generate_tests_for_pyopencl(metafunc): +def pytest_generate_tests_for_pyopencl(metafunc: Metafunc) -> None: """Using the line:: from pyopencl.tools import pytest_generate_tests_for_pyopencl @@ -774,6 +793,10 @@ def pytest_generate_tests_for_pyopencl(metafunc): # {{{ C argument lists +ArgType: TypeAlias = "np.dtype[Any] | VectorArg" +ArgDType: TypeAlias = "np.dtype[Any] | None" + + class Argument(ABC): """ .. automethod:: declarator @@ -850,18 +873,19 @@ def parse_c_arg(c_arg: str, with_offset: bool = False) -> DtypedArgument: c_arg = c_arg.replace("__global", "") if with_offset: - def vec_arg_factory(dtype, name): + def vec_arg_factory(dtype: DTypeLike, name: str) -> VectorArg: return VectorArg(dtype, name, with_offset=True) else: vec_arg_factory = VectorArg from pyopencl.compyte.dtypes import parse_c_arg_backend + return parse_c_arg_backend(c_arg, ScalarArg, vec_arg_factory) def parse_arg_list( - arguments: str | list[str] | Sequence[DtypedArgument], - with_offset: bool = False) -> list[DtypedArgument]: + arguments: str | Sequence[str] | Sequence[Argument], + with_offset: bool = False) -> Sequence[DtypedArgument]: """Parse a list of kernel arguments. *arguments* may be a comma-separate list of C declarators in a string, a list of strings representing C declarators, or :class:`Argument` objects. @@ -870,7 +894,7 @@ def parse_arg_list( if isinstance(arguments, str): arguments = arguments.split(",") - def parse_single_arg(obj: str | DtypedArgument) -> DtypedArgument: + def parse_single_arg(obj: str | Argument) -> DtypedArgument: if isinstance(obj, str): from pyopencl.tools import parse_c_arg return parse_c_arg(obj, with_offset=with_offset) @@ -881,8 +905,8 @@ def parse_single_arg(obj: str | DtypedArgument) -> DtypedArgument: return [parse_single_arg(arg) for arg in arguments] -def get_arg_list_arg_types(arg_types): - result = [] +def get_arg_list_arg_types(arg_types: Sequence[Argument]) -> tuple[ArgType, ...]: + result: list[ArgType] = [] for arg_type in arg_types: if isinstance(arg_type, ScalarArg): @@ -890,15 +914,15 @@ def get_arg_list_arg_types(arg_types): elif isinstance(arg_type, VectorArg): result.append(arg_type) else: - raise RuntimeError("arg type not understood: %s" % type(arg_type)) + raise RuntimeError(f"arg type not understood: {type(arg_type)}") return tuple(result) def get_arg_list_scalar_arg_dtypes( - arg_types: Sequence[DtypedArgument] - ) -> list[np.dtype | None]: - result: list[np.dtype | None] = [] + arg_types: Sequence[Argument] + ) -> Sequence[ArgDType]: + result: list[ArgDType] = [] for arg_type in arg_types: if isinstance(arg_type, ScalarArg): @@ -930,14 +954,14 @@ def get_arg_offset_adjuster_code(arg_types: Sequence[Argument]) -> str: # }}} -def get_gl_sharing_context_properties(): +def get_gl_sharing_context_properties() -> list[tuple[cl.context_properties, Any]]: import pyopencl as cl ctx_props = cl.context_properties from OpenGL import platform as gl_platform - props = [] + props: list[tuple[cl.context_properties, Any]] = [] import sys if sys.platform in ["linux", "linux2"]: @@ -959,24 +983,23 @@ def get_gl_sharing_context_properties(): (ctx_props.CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE, cl.get_apple_cgl_share_group())) else: - raise NotImplementedError("platform '%s' not yet supported" - % sys.platform) + raise NotImplementedError(f"platform '{sys.platform}' not yet supported") return props class _CDeclList: - def __init__(self, device): - self.device = device - self.declared_dtypes = set() - self.declarations = [] - self.saw_double = False - self.saw_complex = False - - def add_dtype(self, dtype): + def __init__(self, device: cl.Device) -> None: + self.device: cl.Device = device + self.declared_dtypes: set[np.dtype[Any]] = set() + self.declarations: list[str] = [] + self.saw_double: bool = False + self.saw_complex: bool = False + + def add_dtype(self, dtype: DTypeLike) -> None: dtype = np.dtype(dtype) - if dtype in (np.float64, np.complex128): + if dtype.type in (np.float64, np.complex128): self.saw_double = True if dtype.kind == "c": @@ -988,17 +1011,20 @@ def add_dtype(self, dtype): if dtype in self.declared_dtypes: return - import pyopencl.cltypes - if dtype in pyopencl.cltypes.vec_type_to_scalar_and_count: + from pyopencl.cltypes import vec_type_to_scalar_and_count + + if dtype in vec_type_to_scalar_and_count: return if hasattr(dtype, "subdtype") and dtype.subdtype is not None: self.add_dtype(dtype.subdtype[0]) return - for _name, field_data in sorted(dtype.fields.items()): - field_dtype, _offset = field_data[:2] - self.add_dtype(field_dtype) + fields = cast("Mapping[str, tuple[np.dtype[Any], int]] | None", dtype.fields) + if fields is not None: + for _name, field_data in sorted(fields.items()): + field_dtype, _offset = field_data[:2] + self.add_dtype(field_dtype) _, cdecl = match_dtype_to_c_struct( self.device, dtype_to_ctype(dtype), dtype) @@ -1006,16 +1032,19 @@ def add_dtype(self, dtype): self.declarations.append(cdecl) self.declared_dtypes.add(dtype) - def visit_arguments(self, arguments): + def visit_arguments(self, arguments: Sequence[Argument]) -> None: for arg in arguments: + if not isinstance(arg, DtypedArgument): + continue + dtype = arg.dtype - if dtype in (np.float64, np.complex128): + if dtype.type in (np.float64, np.complex128): self.saw_double = True if dtype.kind == "c": self.saw_complex = True - def get_declarations(self): + def get_declarations(self) -> str: result = "\n\n".join(self.declarations) if self.saw_complex: @@ -1036,8 +1065,19 @@ def get_declarations(self): return result +class _DTypeDict(TypedDict): + names: list[str] + formats: list[np.dtype[Any]] + offsets: list[int] + itemsize: int + + @memoize -def match_dtype_to_c_struct(device, name, dtype, context=None): +def match_dtype_to_c_struct( + device: cl.Device, + name: str, + dtype: np.dtype[Any], + context: cl.Context | None = None) -> tuple[np.dtype[Any], str]: """Return a tuple ``(dtype, c_decl)`` such that the C struct declaration in ``c_decl`` and the structure :class:`numpy.dtype` instance ``dtype`` have the same memory layout. @@ -1073,14 +1113,18 @@ def match_dtype_to_c_struct(device, name, dtype, context=None): :func:`get_or_register_dtype` on the modified ``dtype`` returned by this function, not the original one. """ + fields = cast("Mapping[str, tuple[np.dtype[Any], int]] | None", dtype.fields) + if not fields: + raise ValueError(f"dtype has no fields: '{dtype}'") import pyopencl as cl - fields = sorted(dtype.fields.items(), + sorted_fields = sorted( + fields.items(), key=lambda name_dtype_offset: name_dtype_offset[1][1]) - c_fields = [] - for field_name, dtype_and_offset in fields: + c_fields: list[str] = [] + for field_name, dtype_and_offset in sorted_fields: field_dtype, _offset = dtype_and_offset[:2] if hasattr(field_dtype, "subdtype") and field_dtype.subdtype is not None: array_dtype = field_dtype.subdtype[0] @@ -1105,15 +1149,15 @@ def match_dtype_to_c_struct(device, name, dtype, context=None): name) cdl = _CDeclList(device) - for _field_name, dtype_and_offset in fields: + for _field_name, dtype_and_offset in sorted_fields: field_dtype, _offset = dtype_and_offset[:2] cdl.add_dtype(field_dtype) pre_decls = cdl.get_declarations() offset_code = "\n".join( - "result[%d] = pycl_offsetof(%s, %s);" % (i+1, name, field_name) - for i, (field_name, _) in enumerate(fields)) + f"result[{i + 1}] = pycl_offsetof({name}, {field_name});" + for i, (field_name, _) in enumerate(sorted_fields)) src = rf""" #define pycl_offsetof(st, m) \ @@ -1140,30 +1184,29 @@ def match_dtype_to_c_struct(device, name, dtype, context=None): prg = cl.Program(context, src) knl = prg.build(devices=[device]).get_size_and_offsets - import pyopencl.array + import pyopencl.array as cl_array + + result_buf = cl_array.empty(queue, 1+len(sorted_fields), np.uint32) + assert result_buf.data is not None - result_buf = cl.array.empty(queue, 1+len(fields), np.uint32) knl(queue, (1,), (1,), result_buf.data) queue.finish() size_and_offsets = result_buf.get() size = int(size_and_offsets[0]) - offsets = size_and_offsets[1:] + if any(ofs >= size for ofs in offsets): # offsets not plausible if dtype.itemsize == size: # If sizes match, use numpy's idea of the offsets. - offsets = [dtype_and_offset[1] - for field_name, dtype_and_offset in fields] + offsets = [dtype_and_offset[1] for _name, dtype_and_offset in sorted_fields] else: raise RuntimeError( - "OpenCL compiler reported offsetof() past sizeof() " - "for struct layout on '%s'. " - "This makes no sense, and it's usually indicates a " - "compiler bug. " - "Refusing to discover struct layout." % device) + "OpenCL compiler reported offsetof() past sizeof() for struct " + f"layout on '{device}'. This makes no sense, and it usually " + "indicates a compiler bug. Refusing to discover struct layout.") result_buf.data.release() del knl @@ -1172,58 +1215,66 @@ def match_dtype_to_c_struct(device, name, dtype, context=None): del context try: - dtype_arg_dict = { - "names": [field_name - for field_name, (field_dtype, offset) in fields], - "formats": [field_dtype - for field_name, (field_dtype, offset) in fields], - "offsets": [int(x) for x in offsets], - "itemsize": int(size_and_offsets[0]), - } - dtype = np.dtype(dtype_arg_dict) - if dtype.itemsize != size_and_offsets[0]: + dtype_arg_dict = _DTypeDict( + names=[name for name, _ in sorted_fields], + formats=[dtype_and_offset[0] for _, dtype_and_offset in sorted_fields], + offsets=[int(x) for x in offsets], + itemsize=int(size_and_offsets[0]), + ) + arg_dtype = np.dtype(dtype_arg_dict) + + if arg_dtype.itemsize != size_and_offsets[0]: # "Old" versions of numpy (1.6.x?) silently ignore "itemsize". Boo. dtype_arg_dict["names"].append("_pycl_size_fixer") - dtype_arg_dict["formats"].append(np.uint8) - dtype_arg_dict["offsets"].append(int(size_and_offsets[0])-1) - dtype = np.dtype(dtype_arg_dict) + dtype_arg_dict["formats"].append(np.dtype(np.uint8)) + dtype_arg_dict["offsets"].append(int(size_and_offsets[0]) - 1) + + arg_dtype = np.dtype(dtype_arg_dict) except NotImplementedError: - def calc_field_type(): + def calc_field_type() -> Iterator[tuple[str, str | np.dtype[Any]]]: total_size = 0 padding_count = 0 - for offset, (field_name, (field_dtype, _)) in zip( - offsets, fields, strict=True): + for offset, (field_name, dtype_and_offset) in zip( + offsets, sorted_fields, strict=True): + field_dtype, _ = dtype_and_offset[:2] if offset > total_size: padding_count += 1 - yield ("__pycl_padding%d" % padding_count, - "V%d" % offset - total_size) + yield f"__pycl_padding{padding_count}", f"V{offset - total_size}" + yield field_name, field_dtype total_size = field_dtype.itemsize + offset - dtype = np.dtype(list(calc_field_type())) - assert dtype.itemsize == size_and_offsets[0] + arg_dtype = np.dtype(list(calc_field_type())) + + assert arg_dtype.itemsize == size_and_offsets[0] - return dtype, c_decl + return arg_dtype, c_decl @memoize -def dtype_to_c_struct(device, dtype): - if dtype.fields is None: +def dtype_to_c_struct(device: cl.Device, dtype: np.dtype[Any]) -> str: + fields = cast("Mapping[str, tuple[np.dtype[Any], int]] | None", dtype.fields) + if fields is None: return "" - import pyopencl.cltypes - if dtype in pyopencl.cltypes.vec_type_to_scalar_and_count: + from pyopencl.cltypes import vec_type_to_scalar_and_count + + if dtype in vec_type_to_scalar_and_count: # Vector types are built-in. Don't try to redeclare those. return "" matched_dtype, c_decl = match_dtype_to_c_struct( device, dtype_to_ctype(dtype), dtype) - def dtypes_match(): - result = len(dtype.fields) == len(matched_dtype.fields) + matched_fields = cast("Mapping[str, tuple[np.dtype[Any], int]] | None", + matched_dtype.fields) + assert matched_fields is not None + + def dtypes_match() -> bool: + result = len(fields) == len(matched_fields) - for name, val in dtype.fields.items(): - result = result and matched_dtype.fields[name] == val + for name, val in fields.items(): + result = result and matched_fields[name] == val return result @@ -1234,38 +1285,48 @@ def dtypes_match(): # {{{ code generation/templating helper -def _process_code_for_macro(code): +def _process_code_for_macro(code: str) -> str: code = code.replace("//CL//", "\n") if "//" in code: - raise RuntimeError("end-of-line comments ('//') may not be used in " - "code snippets") + raise RuntimeError( + "end-of-line comments ('//') may not be used in code snippets") return code.replace("\n", " \\\n") -class _SimpleTextTemplate: - def __init__(self, txt): - self.txt = txt +class _TextTemplate(ABC): + @abstractmethod + def render(self, context: dict[str, Any]) -> str: + pass + + +class _SimpleTextTemplate(_TextTemplate): + def __init__(self, txt: str) -> None: + self.txt: str = txt - def render(self, context): + @override + def render(self, context: dict[str, Any]) -> str: return self.txt -class _PrintfTextTemplate: - def __init__(self, txt): - self.txt = txt +class _PrintfTextTemplate(_TextTemplate): + def __init__(self, txt: str) -> None: + self.txt: str = txt - def render(self, context): + @override + def render(self, context: dict[str, Any]) -> str: return self.txt % context -class _MakoTextTemplate: - def __init__(self, txt): +class _MakoTextTemplate(_TextTemplate): + def __init__(self, txt: str) -> None: from mako.template import Template - self.template = Template(txt, strict_undefined=True) - def render(self, context): + self.template: Template = Template(txt, strict_undefined=True) + + @override + def render(self, context: dict[str, Any]) -> str: return self.template.render(**context) @@ -1279,36 +1340,52 @@ class _ArgumentPlaceholder: See also :class:`_TemplateRenderer.render_arg`. """ - def __init__(self, typename, name, **extra_kwargs): - self.typename = typename - self.name = name - self.extra_kwargs = extra_kwargs + target_class: ClassVar[type[DtypedArgument]] + + def __init__(self, + typename: DTypeLike, + name: str, + **extra_kwargs: Any) -> None: + self.typename: DTypeLike = typename + self.name: str = name + self.extra_kwargs: dict[str, Any] = extra_kwargs class _VectorArgPlaceholder(_ArgumentPlaceholder): - target_class = VectorArg + target_class: ClassVar[type[DtypedArgument]] = VectorArg class _ScalarArgPlaceholder(_ArgumentPlaceholder): - target_class = ScalarArg + target_class: ClassVar[type[DtypedArgument]] = ScalarArg class _TemplateRenderer: - def __init__(self, template, type_aliases, var_values, context=None, - options=None): - self.template = template - self.type_aliases = dict(type_aliases) - self.var_dict = dict(var_values) + def __init__(self, + template: KernelTemplateBase, + type_aliases: ( + dict[str, np.dtype[Any]] + | Sequence[tuple[str, np.dtype[Any]]]), + var_values: dict[str, str] | Sequence[tuple[str, str]], + context: cl.Context | None = None, + options: Any = None) -> None: + self.template: KernelTemplateBase = template + self.type_aliases: dict[str, np.dtype[Any]] = dict(type_aliases) + self.var_dict: dict[str, str] = dict(var_values) for name in self.var_dict: if name.startswith("macro_"): - self.var_dict[name] = _process_code_for_macro( - self.var_dict[name]) + self.var_dict[name] = _process_code_for_macro(self.var_dict[name]) + + self.context: cl.Context | None = context + self.options: Any = options + + @overload + def __call__(self, txt: None) -> None: ... - self.context = context - self.options = options + @overload + def __call__(self, txt: str) -> str: ... - def __call__(self, txt): + def __call__(self, txt: str | None) -> str | None: if txt is None: return txt @@ -1316,7 +1393,10 @@ def __call__(self, txt): return str(result) - def get_rendered_kernel(self, txt, kernel_name): + def get_rendered_kernel(self, txt: str, kernel_name: str) -> cl.Kernel: + if self.context is None: + raise ValueError("context not provided -- cannot render kernel") + import pyopencl as cl prg = cl.Program(self.context, self(txt)).build(self.options) @@ -1326,7 +1406,7 @@ def get_rendered_kernel(self, txt, kernel_name): return getattr(prg, kernel_name) - def parse_type(self, typename): + def parse_type(self, typename: Any) -> np.dtype[Any]: if isinstance(typename, str): try: return self.type_aliases[typename] @@ -1336,21 +1416,22 @@ def parse_type(self, typename): else: return np.dtype(typename) - def render_arg(self, arg_placeholder): + def render_arg(self, arg_placeholder: _ArgumentPlaceholder) -> DtypedArgument: return arg_placeholder.target_class( self.parse_type(arg_placeholder.typename), arg_placeholder.name, **arg_placeholder.extra_kwargs) - _C_COMMENT_FINDER = re.compile(r"/\*.*?\*/") + _C_COMMENT_FINDER: ClassVar[re.Pattern[str]] = re.compile(r"/\*.*?\*/") - def render_argument_list(self, *arg_lists, **kwargs): - with_offset = kwargs.pop("with_offset", False) + def render_argument_list(self, + *arg_lists: Any, + with_offset: bool = False, + **kwargs: Any) -> list[Argument]: if kwargs: raise TypeError("unrecognized kwargs: " + ", ".join(kwargs)) - all_args = [] - + all_args: list[Any] = [] for arg_list in arg_lists: if isinstance(arg_list, str): arg_list = str( @@ -1364,13 +1445,16 @@ def render_argument_list(self, *arg_lists, **kwargs): all_args.extend(arg_list) if with_offset: - def vec_arg_factory(typename, name): + def vec_arg_factory( + typename: DTypeLike, + name: str) -> _VectorArgPlaceholder: return _VectorArgPlaceholder(typename, name, with_offset=True) else: vec_arg_factory = _VectorArgPlaceholder from pyopencl.compyte.dtypes import parse_c_arg_backend - parsed_args = [] + + parsed_args: list[Argument] = [] for arg in all_args: if isinstance(arg, str): arg = arg.strip() @@ -1379,12 +1463,13 @@ def vec_arg_factory(typename, name): ph = parse_c_arg_backend(arg, _ScalarArgPlaceholder, vec_arg_factory, - name_to_dtype=lambda x: x) + name_to_dtype=lambda x: x) # pyright: ignore[reportArgumentType] parsed_arg = self.render_arg(ph) - elif isinstance(arg, Argument): parsed_arg = arg elif isinstance(arg, tuple): + assert isinstance(arg[0], str) + assert isinstance(arg[1], str) parsed_arg = ScalarArg(self.parse_type(arg[0]), arg[1]) else: raise TypeError("unexpected argument type: %s" % type(arg)) @@ -1393,7 +1478,11 @@ def vec_arg_factory(typename, name): return parsed_args - def get_type_decl_preamble(self, device, decl_type_names, arguments=None): + def get_type_decl_preamble(self, + device: cl.Device, + decl_type_names: Sequence[DTypeLike], + arguments: Sequence[Argument] | None = None, + ) -> str: cdl = _CDeclList(device) for typename in decl_type_names: @@ -1413,20 +1502,19 @@ def get_type_decl_preamble(self, device, decl_type_names, arguments=None): return cdl.get_declarations() + "\n" + "\n".join(type_alias_decls) -class KernelTemplateBase: - def __init__(self, template_processor=None): - self.template_processor = template_processor +class KernelTemplateBase(ABC): + def __init__(self, template_processor: str | None = None) -> None: + self.template_processor: str | None = template_processor - self.build_cache = {} + self.build_cache: dict[Hashable, Any] = {} _first_arg_dependent_caches.append(self.build_cache) - def get_preamble(self): - pass - - _TEMPLATE_PROCESSOR_PATTERN = re.compile(r"^//CL(?::([a-zA-Z0-9_]+))?//") + _TEMPLATE_PROCESSOR_PATTERN: ClassVar[re.Pattern[str]] = ( + re.compile(r"^//CL(?::([a-zA-Z0-9_]+))?//") + ) @memoize_method - def get_text_template(self, txt): + def get_text_template(self, txt: str) -> _TextTemplate: proc_match = self._TEMPLATE_PROCESSOR_PATTERN.match(txt) tpl_processor = None @@ -1434,6 +1522,7 @@ def get_text_template(self, txt): tpl_processor = proc_match.group(1) # chop off //CL// mark txt = txt[len(proc_match.group(0)):] + if tpl_processor is None: tpl_processor = self.template_processor @@ -1444,16 +1533,27 @@ def get_text_template(self, txt): elif tpl_processor == "mako": return _MakoTextTemplate(txt) else: - raise RuntimeError( - "unknown template processor '%s'" % proc_match.group(1)) + raise RuntimeError(f"unknown template processor '{tpl_processor}'") - def get_renderer(self, type_aliases, var_values, context=None, options=None): + # TODO: this does not seem to be used anywhere -> deprecate / remove + def get_preamble(self) -> str: + return "" + + def get_renderer(self, + type_aliases: ( + dict[str, np.dtype[Any]] + | Sequence[tuple[str, np.dtype[Any]]]), + var_values: dict[str, str] | Sequence[tuple[str, str]], + context: cl.Context | None = None, # pyright: ignore[reportUnusedParameter] + options: Any = None, # pyright: ignore[reportUnusedParameter] + ) -> _TemplateRenderer: return _TemplateRenderer(self, type_aliases, var_values) - def build_inner(self, context, *args, **kwargs): - raise NotImplementedError + @abstractmethod + def build_inner(self, context: cl.Context, *args: Any, **kwargs: Any) -> Any: + pass - def build(self, context, *args, **kwargs): + def build(self, context: cl.Context, *args: Any, **kwargs: Any) -> Any: """Provide caching for an :meth:`build_inner`.""" cache_key = (context, args, tuple(sorted(kwargs.items()))) @@ -1469,41 +1569,47 @@ def build(self, context, *args, **kwargs): # {{{ array_module +# TODO: this is not used anywhere: deprecate + remove + class _CLFakeArrayModule: - def __init__(self, queue): - self.queue = queue + def __init__(self, queue: cl.CommandQueue | None = None) -> None: + self.queue: cl.CommandQueue | None = queue @property - def ndarray(self): + def ndarray(self) -> type[CLArray]: from pyopencl.array import Array return Array - def dot(self, x, y): + def dot(self, x: CLArray, y: CLArray) -> NDArray[Any]: from pyopencl.array import dot return dot(x, y, queue=self.queue).get() - def vdot(self, x, y): + def vdot(self, x: CLArray, y: CLArray) -> NDArray[Any]: from pyopencl.array import vdot return vdot(x, y, queue=self.queue).get() - def empty(self, shape, dtype, order="C"): + def empty(self, + shape: int | tuple[int, ...], + dtype: DTypeLike, + order: str = "C") -> CLArray: from pyopencl.array import empty return empty(self.queue, shape, dtype, order=order) - def hstack(self, arrays): + def hstack(self, arrays: Sequence[CLArray]) -> CLArray: from pyopencl.array import hstack return hstack(arrays, self.queue) -def array_module(a): +def array_module(a: Any) -> Any: if isinstance(a, np.ndarray): return np else: from pyopencl.array import Array + if isinstance(a, Array): return _CLFakeArrayModule(a.queue) else: - raise TypeError("array type not understood: %s" % type(a)) + raise TypeError(f"array type not understood: {type(a)}") # }}} @@ -1519,19 +1625,19 @@ def is_spirv(s: str | bytes) -> TypeIs[bytes]: # {{{ numpy key types builder -class _NumpyTypesKeyBuilder(KeyBuilderBase): - def update_for_VectorArg(self, key_hash, key): # noqa: N802 +class _NumpyTypesKeyBuilder(KeyBuilderBase): # pyright: ignore[reportUnusedClass] + def update_for_VectorArg(self, key_hash: Hash, key: VectorArg) -> None: # noqa: N802 self.rec(key_hash, key.dtype) self.update_for_str(key_hash, key.name) self.rec(key_hash, key.with_offset) - def update_for_type(self, key_hash, key): + @override + def update_for_type(self, key_hash: Hash, key: type) -> None: if issubclass(key, np.generic): self.update_for_str(key_hash, key.__name__) return - raise TypeError("unsupported type for persistent hash keying: %s" - % type(key)) + raise TypeError(f"unsupported type for persistent hash keying: {key}") # }}} From eea9471dd8417e851f75a8229d153c341dacdb21 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Sun, 6 Jul 2025 15:55:02 +0300 Subject: [PATCH 05/11] feat(typing): small fixes in elementwise --- pyopencl/_monkeypatch.py | 2 +- pyopencl/elementwise.py | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/pyopencl/_monkeypatch.py b/pyopencl/_monkeypatch.py index 2bcc5df5f..2322ff0ba 100644 --- a/pyopencl/_monkeypatch.py +++ b/pyopencl/_monkeypatch.py @@ -223,7 +223,7 @@ def __getattr__(self, name: str): kernel_old_get_work_group_info = _cl.Kernel.get_work_group_info -def kernel_set_arg_types(self: _cl.Kernel, arg_types): +def kernel_set_arg_types(self: _cl.Kernel, arg_types) -> None: arg_types = tuple(arg_types) # {{{ arg counting bug handling diff --git a/pyopencl/elementwise.py b/pyopencl/elementwise.py index 1c9d7eacf..5432f7d18 100644 --- a/pyopencl/elementwise.py +++ b/pyopencl/elementwise.py @@ -37,6 +37,7 @@ import pyopencl as cl from pyopencl.tools import ( + Argument, DtypedArgument, KernelTemplateBase, ScalarArg, @@ -55,7 +56,7 @@ def get_elwise_program( context: cl.Context, - arguments: list[DtypedArgument], + arguments: Sequence[Argument], operation: str, *, name: str = "elwise_kernel", options: Any = None, @@ -123,27 +124,27 @@ def get_elwise_program( def get_elwise_kernel_and_types( context: cl.Context, - arguments: str | Sequence[DtypedArgument], + arguments: str | Sequence[Argument], operation: str, *, name: str = "elwise_kernel", options: Any = None, preamble: str = "", use_range: bool = False, - **kwargs: Any) -> tuple[cl.Kernel, list[DtypedArgument]]: + **kwargs: Any) -> tuple[cl.Kernel, Sequence[Argument]]: from pyopencl.tools import get_arg_offset_adjuster_code, parse_arg_list parsed_args = parse_arg_list(arguments, with_offset=True) auto_preamble = kwargs.pop("auto_preamble", True) - pragmas = [] - includes = [] + pragmas: list[str] = [] + includes: list[str] = [] have_double_pragma = False have_complex_include = False if auto_preamble: for arg in parsed_args: - if arg.dtype in [np.float64, np.complex128]: + if arg.dtype.type in [np.float64, np.complex128]: if not have_double_pragma: pragmas.append(""" #if __OPENCL_C_VERSION__ < 120 @@ -186,14 +187,14 @@ def get_elwise_kernel_and_types( def get_elwise_kernel( context: cl.Context, - arguments: str | list[DtypedArgument], + arguments: str | Sequence[Argument], operation: str, *, name: str = "elwise_kernel", options: Any = None, **kwargs: Any) -> cl.Kernel: """Return a L{pyopencl.Kernel} that performs the same scalar operation on one or several vectors. """ - func, arguments = get_elwise_kernel_and_types( + func, _arguments = get_elwise_kernel_and_types( context, arguments, operation, name=name, options=options, **kwargs) @@ -233,7 +234,7 @@ class ElementwiseKernel: def __init__( self, context: cl.Context, - arguments: str | Sequence[DtypedArgument], + arguments: str | Sequence[Argument], operation: str, name: str = "elwise_kernel", options: Any = None, **kwargs: Any) -> None: From 277f48dac1b2dc31fc8af5f8ccd7879d81613c0b Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Mon, 7 Jul 2025 11:04:53 +0300 Subject: [PATCH 06/11] feat: make _TextTemplate subclasses into dataclasses --- pyopencl/tools.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pyopencl/tools.py b/pyopencl/tools.py index 2b9599b1a..5f6f3e8a2 100644 --- a/pyopencl/tools.py +++ b/pyopencl/tools.py @@ -131,7 +131,7 @@ import atexit import re from abc import ABC, abstractmethod -from dataclasses import dataclass +from dataclasses import dataclass, field from sys import intern from typing import ( TYPE_CHECKING, @@ -164,6 +164,7 @@ if TYPE_CHECKING: from collections.abc import Callable, Hashable, Iterator, Mapping, Sequence + from mako.template import Template from numpy.typing import DTypeLike, NDArray from pytest import Metafunc @@ -1301,29 +1302,33 @@ def render(self, context: dict[str, Any]) -> str: pass +@dataclass(frozen=True) class _SimpleTextTemplate(_TextTemplate): - def __init__(self, txt: str) -> None: - self.txt: str = txt + txt: str @override def render(self, context: dict[str, Any]) -> str: return self.txt +@dataclass(frozen=True) class _PrintfTextTemplate(_TextTemplate): - def __init__(self, txt: str) -> None: - self.txt: str = txt + txt: str @override def render(self, context: dict[str, Any]) -> str: return self.txt % context +@dataclass(frozen=True) class _MakoTextTemplate(_TextTemplate): - def __init__(self, txt: str) -> None: + txt: str + template: Template = field(init=False) + + def __post_init__(self) -> None: from mako.template import Template - self.template: Template = Template(txt, strict_undefined=True) + object.__setattr__(self, "template", Template(self.txt, strict_undefined=True)) @override def render(self, context: dict[str, Any]) -> str: From 2ab0bfcd1078dbccc6336fc17dfdb4d76c59a2e1 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Sun, 6 Jul 2025 19:17:25 +0300 Subject: [PATCH 07/11] fix: add links for make sphinx work --- doc/array.rst | 7 +++++++ doc/conf.py | 1 + pyopencl/tools.py | 6 +++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/array.rst b/doc/array.rst index 46b4216f4..a8ccec839 100644 --- a/doc/array.rst +++ b/doc/array.rst @@ -308,3 +308,10 @@ Generating Arrays of Random Numbers ----------------------------------- .. automodule:: pyopencl.clrandom + +Type Aliases +------------ + +.. class:: cl.Device + + See :class:`pyopencl.Device`. diff --git a/doc/conf.py b/doc/conf.py index a17aa0386..fa1a8131c 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -22,6 +22,7 @@ nitpick_ignore = [ ("py:class", r"numpy._typing._dtype_like._SupportsDType"), ("py:class", r"numpy._typing._dtype_like._DTypeDict"), + ("py:class", r"pytest.Metafunc"), ] intersphinx_mapping = { diff --git a/pyopencl/tools.py b/pyopencl/tools.py index 5f6f3e8a2..e568b6eda 100644 --- a/pyopencl/tools.py +++ b/pyopencl/tools.py @@ -164,9 +164,9 @@ if TYPE_CHECKING: from collections.abc import Callable, Hashable, Iterator, Mapping, Sequence + import pytest from mako.template import Template from numpy.typing import DTypeLike, NDArray - from pytest import Metafunc # Do not add a pyopencl import here: This will add an import cycle. @@ -708,7 +708,7 @@ def get_test_platforms_and_devices( def get_pyopencl_fixture_arg_names( - metafunc: Metafunc, + metafunc: pytest.Metafunc, extra_arg_names: list[str] | None = None) -> list[str]: if extra_arg_names is None: extra_arg_names = [] @@ -760,7 +760,7 @@ def idfn(val: Any) -> str: return arg_values, idfn -def pytest_generate_tests_for_pyopencl(metafunc: Metafunc) -> None: +def pytest_generate_tests_for_pyopencl(metafunc: pytest.Metafunc) -> None: """Using the line:: from pyopencl.tools import pytest_generate_tests_for_pyopencl From b1ab0350c32c61eea508b4f49cf641ff401487fa Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 7 Jul 2025 12:51:04 -0500 Subject: [PATCH 08/11] bpr config: Demote private usage to hint --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index f2d1f3452..9a0233506 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -227,6 +227,7 @@ reportUnnecessaryIsInstance = "none" reportUnusedCallResult = "none" reportExplicitAny = "none" reportUnreachable = "hint" +reportPrivateUsage = "hint" # This reports even cycles that are qualified by 'if TYPE_CHECKING'. Not what # we care about at this moment. From c29f29403c44374dba2457543bec2a90e5fc9863 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 7 Jul 2025 12:51:16 -0500 Subject: [PATCH 09/11] Add some types in scan --- pyopencl/scan.py | 53 ++++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/pyopencl/scan.py b/pyopencl/scan.py index 948075776..6922d173e 100644 --- a/pyopencl/scan.py +++ b/pyopencl/scan.py @@ -26,7 +26,7 @@ import logging from abc import ABC, abstractmethod from dataclasses import dataclass -from typing import Any +from typing import TYPE_CHECKING, Any, cast import numpy as np @@ -49,6 +49,10 @@ ) +if TYPE_CHECKING: + from collections.abc import Sequence + + logger = logging.getLogger(__name__) @@ -900,7 +904,7 @@ class _BuiltScanKernelInfo: class _GeneratedFinalUpdateKernelInfo: source: str kernel_name: str - scalar_arg_dtypes: list[np.dtype | None] + scalar_arg_dtypes: Sequence[np.dtype | None] update_wg_size: int def build(self, @@ -942,7 +946,7 @@ def __init__( name_prefix: str = "scan", options: Any = None, preamble: str = "", - devices: cl.Device | None = None) -> None: + devices: Sequence[cl.Device] | None = None) -> None: """ :arg ctx: a :class:`pyopencl.Context` within which the code for this scan kernel will be generated. @@ -1031,7 +1035,8 @@ def __init__( if input_fetch_exprs is None: input_fetch_exprs = [] - self.context = ctx + self.context: cl.Context = ctx + self.dtype: np.dtype[Any] dtype = self.dtype = np.dtype(dtype) if neutral is None: @@ -1044,35 +1049,35 @@ def __init__( if dtype.itemsize % 4 != 0: raise TypeError("scan value type must have size divisible by 4 bytes") - self.index_dtype = np.dtype(index_dtype) + self.index_dtype: np.dtype[np.integer] = np.dtype(index_dtype) if np.iinfo(self.index_dtype).min >= 0: raise TypeError("index_dtype must be signed") if devices is None: devices = ctx.devices - self.devices = devices + self.devices: Sequence[cl.Device] = devices self.options = options from pyopencl.tools import parse_arg_list - self.parsed_args = parse_arg_list(arguments) + self.parsed_args: Sequence[DtypedArgument] = parse_arg_list(arguments) from pyopencl.tools import VectorArg - self.first_array_idx = next( + self.first_array_idx: int = next( i for i, arg in enumerate(self.parsed_args) if isinstance(arg, VectorArg)) - self.input_expr = input_expr + self.input_expr: str = input_expr - self.is_segment_start_expr = is_segment_start_expr - self.is_segmented = is_segment_start_expr is not None - if self.is_segmented: + self.is_segment_start_expr: str | None = is_segment_start_expr + self.is_segmented: bool = is_segment_start_expr is not None + if is_segment_start_expr is not None: is_segment_start_expr = _process_code_for_macro(is_segment_start_expr) - self.output_statement = output_statement + self.output_statement: str = output_statement for _name, _arg_name, ife_offset in input_fetch_exprs: if ife_offset not in [0, -1]: raise RuntimeError("input_fetch_expr offsets must either be 0 or -1") - self.input_fetch_exprs = input_fetch_exprs + self.input_fetch_exprs: Sequence[tuple[str, str, int]] = input_fetch_exprs arg_dtypes = {} arg_ctypes = {} @@ -1080,7 +1085,7 @@ def __init__( arg_dtypes[arg.name] = arg.dtype arg_ctypes[arg.name] = dtype_to_ctype(arg.dtype) - self.name_prefix = name_prefix + self.name_prefix: str = name_prefix # {{{ set up shared code dict @@ -1128,8 +1133,8 @@ def __init__( # }}} - self.use_lookbehind_update = "prev_item" in self.output_statement - self.store_segment_start_flags = ( + self.use_lookbehind_update: bool = "prev_item" in self.output_statement + self.store_segment_start_flags: bool = ( self.is_segmented and self.use_lookbehind_update) self.finish_setup() @@ -1233,8 +1238,8 @@ def _finish_setup_impl(self) -> None: # not sure where these go, but roughly this much seems unavailable. avail_local_mem -= 0x400 - is_cpu = self.devices[0].type & cl.device_type.CPU - is_gpu = self.devices[0].type & cl.device_type.GPU + is_cpu = bool(self.devices[0].type & cl.device_type.CPU) + is_gpu = bool(self.devices[0].type & cl.device_type.GPU) if is_cpu: # (about the widest vector a CPU can support, also taking @@ -1260,7 +1265,7 @@ def _finish_setup_impl(self) -> None: # k_group_size should be a power of two because of in-kernel # division by that number. - solutions = [] + solutions: list[tuple[int, int, int]] = [] for k_exp in range(0, 9): for wg_size in range(wg_size_multiples, max_scan_wg_size+1, wg_size_multiples): @@ -1402,7 +1407,7 @@ def get_local_mem_use( for arg in self.parsed_args: arg_dtypes[arg.name] = arg.dtype - fetch_expr_offsets: dict[str, set] = {} + fetch_expr_offsets: dict[str, set[int]] = {} for _name, arg_name, ife_offset in self.input_fetch_exprs: fetch_expr_offsets.setdefault(arg_name, set()).add(ife_offset) @@ -1428,10 +1433,10 @@ def get_local_mem_use( def generate_scan_kernel( self, max_wg_size: int, - arguments: list[DtypedArgument], + arguments: Sequence[DtypedArgument], input_expr: str, is_segment_start_expr: str | None, - input_fetch_exprs: list[tuple[str, str, int]], + input_fetch_exprs: Sequence[tuple[str, str, int]], is_first_level: bool, store_segment_start_flags: bool, k_group_size: int, @@ -1442,7 +1447,7 @@ def generate_scan_kernel( wg_size = _round_down_to_power_of_2( min(max_wg_size, 256)) - kernel_name = self.code_variables["name_prefix"] + kernel_name = cast("str", self.code_variables["name_prefix"]) if is_first_level: kernel_name += "_lev1" else: From f008dcc5ed3d6878bc9200f7301f8d343bda49e5 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 7 Jul 2025 12:51:23 -0500 Subject: [PATCH 10/11] Add some types in elementwise --- pyopencl/elementwise.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pyopencl/elementwise.py b/pyopencl/elementwise.py index 5432f7d18..0c61e44eb 100644 --- a/pyopencl/elementwise.py +++ b/pyopencl/elementwise.py @@ -29,7 +29,7 @@ import enum -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, cast import numpy as np @@ -51,6 +51,8 @@ if TYPE_CHECKING: from collections.abc import Sequence + from pyopencl.array import Array + # {{{ elementwise kernel code generator @@ -269,7 +271,7 @@ def get_kernel(self, use_range: bool): return knl, arg_descrs - def __call__(self, *args, **kwargs) -> cl.Event: + def __call__(self, *args, **kwargs: Any) -> cl.Event: """ Invoke the generated scalar kernel. @@ -281,7 +283,7 @@ def __call__(self, *args, **kwargs) -> cl.Event: range_ = kwargs.pop("range", None) slice_ = kwargs.pop("slice", None) capture_as = kwargs.pop("capture_as", None) - queue = kwargs.pop("queue", None) + queue: cl.CommandQueue | None = kwargs.pop("queue", None) wait_for = kwargs.pop("wait_for", None) if kwargs: @@ -298,14 +300,14 @@ def __call__(self, *args, **kwargs) -> cl.Event: # {{{ assemble arg array - repr_vec = None + repr_vec: Array | None = None invocation_args = [] # non-strict because length arg gets appended below for arg, arg_descr in zip(args, arg_descrs, strict=False): if isinstance(arg_descr, VectorArg): if repr_vec is None: - repr_vec = arg + repr_vec = cast("Array", arg) invocation_args.append(arg) else: @@ -325,6 +327,8 @@ def __call__(self, *args, **kwargs) -> cl.Event: range_ = slice(*slice_.indices(repr_vec.size)) + assert queue is not None + max_wg_size = kernel.get_work_group_info( cl.kernel_work_group_info.WORK_GROUP_SIZE, queue.device) From 02041af5b208a562e3ff1ddbad76aab71d6403ff Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Sat, 5 Jul 2025 11:14:00 +0300 Subject: [PATCH 11/11] chore: update baseline --- .basedpyright/baseline.json | 5326 ++--------------------------------- 1 file changed, 290 insertions(+), 5036 deletions(-) diff --git a/.basedpyright/baseline.json b/.basedpyright/baseline.json index 8acc8c67c..3757df8ba 100644 --- a/.basedpyright/baseline.json +++ b/.basedpyright/baseline.json @@ -937,38 +937,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 17, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 19, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 20, - "endColumn": 65, - "lineCount": 1 - } - }, - { - "code": "reportArgumentType", - "range": { - "startColumn": 17, - "endColumn": 27, - "lineCount": 6 - } - }, { "code": "reportAssignmentType", "range": { @@ -2061,14 +2029,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 4, - "endColumn": 30, - "lineCount": 1 - } - }, { "code": "reportUnknownVariableType", "range": { @@ -2109,14 +2069,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 11, - "endColumn": 17, - "lineCount": 1 - } - }, { "code": "reportUnknownVariableType", "range": { @@ -2745,22 +2697,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 4, - "endColumn": 7, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 10, - "endColumn": 33, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -2809,14 +2745,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 4, - "endColumn": 7, - "lineCount": 1 - } - }, { "code": "reportUnknownVariableType", "range": { @@ -3065,22 +2993,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 4, - "endColumn": 7, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 10, - "endColumn": 35, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -3137,14 +3049,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 4, - "endColumn": 7, - "lineCount": 1 - } - }, { "code": "reportUnknownVariableType", "range": { @@ -3265,22 +3169,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 4, - "endColumn": 7, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 10, - "endColumn": 32, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -3329,14 +3217,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 4, - "endColumn": 7, - "lineCount": 1 - } - }, { "code": "reportUnknownVariableType", "range": { @@ -3529,14 +3409,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 54, - "endColumn": 77, - "lineCount": 1 - } - }, { "code": "reportUnknownArgumentType", "range": { @@ -5361,6 +5233,14 @@ "lineCount": 1 } }, + { + "code": "reportOperatorIssue", + "range": { + "startColumn": 44, + "endColumn": 77, + "lineCount": 1 + } + }, { "code": "reportUnknownArgumentType", "range": { @@ -6649,22 +6529,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 23, - "endColumn": 41, - "lineCount": 13 - } - }, { "code": "reportUnknownArgumentType", "range": { @@ -6713,14 +6577,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 29, - "endColumn": 41, - "lineCount": 1 - } - }, { "code": "reportUnknownParameterType", "range": { @@ -15299,14 +15155,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 16, - "endColumn": 33, - "lineCount": 3 - } - }, { "code": "reportUnknownVariableType", "range": { @@ -28337,14 +28185,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 8, - "endColumn": 22, - "lineCount": 1 - } - }, { "code": "reportUnknownParameterType", "range": { @@ -28393,30 +28233,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 16, - "endColumn": 17, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 19, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 37, - "endColumn": 73, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -28497,14 +28313,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 15, - "endColumn": 55, - "lineCount": 1 - } - }, { "code": "reportUnknownParameterType", "range": { @@ -28601,14 +28409,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 33, - "endColumn": 48, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -29730,208 +29530,6 @@ } } ], - "./pyopencl/cltypes.py": [ - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 4, - "endColumn": 24, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 19, - "endColumn": 22, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 19, - "endColumn": 22, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 24, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 24, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportArgumentType", - "range": { - "startColumn": 30, - "endColumn": 65, - "lineCount": 1 - } - }, - { - "code": "reportUnusedVariable", - "range": { - "startColumn": 61, - "endColumn": 66, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 29, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 29, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 36, - "endColumn": 41, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 36, - "endColumn": 41, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 43, - "endColumn": 55, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 43, - "endColumn": 55, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 58, - "endColumn": 62, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 58, - "endColumn": 62, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 66, - "endColumn": 72, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 66, - "endColumn": 72, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 23, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 16, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 36, - "endColumn": 81, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 41, - "endColumn": 45, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 75, - "endColumn": 79, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 25, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 37, - "endColumn": 51, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 11, - "endColumn": 50, - "lineCount": 1 - } - } - ], "./pyopencl/compyte/array.py": [ { "code": "reportUnknownParameterType", @@ -30753,51 +30351,35 @@ } ], "./pyopencl/elementwise.py": [ - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 4, - "endColumn": 21, - "lineCount": 1 - } - }, - { - "code": "reportUnnecessaryContains", - "range": { - "startColumn": 15, - "endColumn": 55, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { - "startColumn": 20, - "endColumn": 34, + "startColumn": 8, + "endColumn": 26, "lineCount": 1 } }, { - "code": "reportUnknownMemberType", + "code": "reportAttributeAccessIssue", "range": { "startColumn": 20, - "endColumn": 35, + "endColumn": 26, "lineCount": 1 } }, { - "code": "reportUnknownArgumentType", + "code": "reportUnknownMemberType", "range": { - "startColumn": 29, - "endColumn": 45, + "startColumn": 8, + "endColumn": 26, "lineCount": 1 } }, { - "code": "reportUnknownVariableType", + "code": "reportAttributeAccessIssue", "range": { - "startColumn": 31, - "endColumn": 53, + "startColumn": 20, + "endColumn": 26, "lineCount": 1 } }, @@ -31097,14 +30679,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 19, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -31241,14 +30815,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 20, - "endColumn": 31, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -31393,14 +30959,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 24, - "lineCount": 1 - } - }, { "code": "reportUnannotatedClassAttribute", "range": { @@ -31545,14 +31103,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 19, - "endColumn": 36, - "lineCount": 1 - } - }, { "code": "reportUnknownArgumentType", "range": { @@ -31577,38 +31127,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 19, - "endColumn": 48, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 32, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 29, - "endColumn": 60, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -31641,30 +31159,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 12, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 22, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 17, - "endColumn": 36, - "lineCount": 1 - } - }, { "code": "reportUnknownParameterType", "range": { @@ -31761,14 +31255,6 @@ "lineCount": 1 } }, - { - "code": "reportArgumentType", - "range": { - "startColumn": 38, - "endColumn": 42, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -31953,14 +31439,6 @@ "lineCount": 1 } }, - { - "code": "reportArgumentType", - "range": { - "startColumn": 38, - "endColumn": 42, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -32081,14 +31559,6 @@ "lineCount": 1 } }, - { - "code": "reportArgumentType", - "range": { - "startColumn": 38, - "endColumn": 42, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -37247,14 +36717,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 4, - "endColumn": 27, - "lineCount": 1 - } - }, { "code": "reportMissingTypeStubs", "range": { @@ -37272,50 +36734,82 @@ } }, { - "code": "reportUnnecessaryComparison", + "code": "reportAssignmentType", "range": { - "startColumn": 22, - "endColumn": 43, + "startColumn": 16, + "endColumn": 59, "lineCount": 1 } }, { - "code": "reportUnannotatedClassAttribute", + "code": "reportArgumentType", "range": { - "startColumn": 25, - "endColumn": 34, + "startColumn": 44, + "endColumn": 53, "lineCount": 1 } }, { - "code": "reportUnannotatedClassAttribute", + "code": "reportArgumentType", "range": { - "startColumn": 17, - "endColumn": 28, + "startColumn": 44, + "endColumn": 53, "lineCount": 1 } }, { - "code": "reportUnknownArgumentType", + "code": "reportOperatorIssue", "range": { - "startColumn": 35, - "endColumn": 49, + "startColumn": 12, + "endColumn": 55, + "lineCount": 2 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 45, + "endColumn": 54, "lineCount": 1 } }, { - "code": "reportUnknownVariableType", + "code": "reportArgumentType", "range": { - "startColumn": 12, - "endColumn": 30, + "startColumn": 18, + "endColumn": 27, "lineCount": 1 } }, { - "code": "reportUnknownVariableType", + "code": "reportAssignmentType", "range": { - "startColumn": 16, - "endColumn": 30, + "startColumn": 20, + "endColumn": 63, + "lineCount": 1 + } + }, + { + "code": "reportUnannotatedClassAttribute", + "range": { + "startColumn": 25, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnannotatedClassAttribute", + "range": { + "startColumn": 17, + "endColumn": 28, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 52, + "endColumn": 61, "lineCount": 1 } }, @@ -37328,10 +36822,10 @@ } }, { - "code": "reportUnknownArgumentType", + "code": "reportArgumentType", "range": { - "startColumn": 31, - "endColumn": 45, + "startColumn": 48, + "endColumn": 57, "lineCount": 1 } }, @@ -37367,14 +36861,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 24, - "lineCount": 1 - } - }, { "code": "reportUnannotatedClassAttribute", "range": { @@ -37551,14 +37037,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 19, - "endColumn": 36, - "lineCount": 1 - } - }, { "code": "reportUnknownArgumentType", "range": { @@ -37583,38 +37061,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 19, - "endColumn": 48, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 32, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 29, - "endColumn": 60, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -37648,77 +37094,13 @@ } }, { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 40, - "endColumn": 61, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 16, - "endColumn": 38, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 40, - "endColumn": 66, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 16, - "endColumn": 39, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 45, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", + "code": "reportArgumentType", "range": { "startColumn": 16, "endColumn": 77, "lineCount": 1 } }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 62, - "endColumn": 76, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 21, - "endColumn": 47, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 25, - "endColumn": 68, - "lineCount": 4 - } - }, { "code": "reportUnknownParameterType", "range": { @@ -38713,14 +38095,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 4, - "endColumn": 27, - "lineCount": 1 - } - }, { "code": "reportUnknownParameterType", "range": { @@ -38913,6 +38287,14 @@ "lineCount": 1 } }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 60, + "endColumn": 81, + "lineCount": 1 + } + }, { "code": "reportUnannotatedClassAttribute", "range": { @@ -38953,6 +38335,14 @@ "lineCount": 1 } }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 47, + "endColumn": 54, + "lineCount": 1 + } + }, { "code": "reportIndexIssue", "range": { @@ -39562,42 +38952,26 @@ } }, { - "code": "reportUnknownArgumentType", + "code": "reportArgumentType", "range": { - "startColumn": 33, - "endColumn": 45, + "startColumn": 38, + "endColumn": 54, "lineCount": 1 } }, { "code": "reportUnknownArgumentType", "range": { - "startColumn": 48, - "endColumn": 75, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 30, + "startColumn": 33, + "endColumn": 45, "lineCount": 1 } }, { "code": "reportUnknownArgumentType", "range": { - "startColumn": 20, - "endColumn": 43, - "lineCount": 4 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 24, - "endColumn": 27, + "startColumn": 48, + "endColumn": 75, "lineCount": 1 } }, @@ -39625,22 +38999,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 16, - "endColumn": 32, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 39, - "endColumn": 57, - "lineCount": 1 - } - }, { "code": "reportUnknownArgumentType", "range": { @@ -39673,6 +39031,14 @@ "lineCount": 1 } }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 22, + "lineCount": 1 + } + }, { "code": "reportUnknownArgumentType", "range": { @@ -39713,6 +39079,14 @@ "lineCount": 1 } }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 16, + "endColumn": 30, + "lineCount": 1 + } + }, { "code": "reportUnknownVariableType", "range": { @@ -39865,6 +39239,70 @@ "lineCount": 1 } }, + { + "code": "reportUnknownMemberType", + "range": { + "startColumn": 8, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 26, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportUnknownMemberType", + "range": { + "startColumn": 12, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 30, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportUnknownMemberType", + "range": { + "startColumn": 12, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 30, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportUnknownMemberType", + "range": { + "startColumn": 12, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 30, + "endColumn": 36, + "lineCount": 1 + } + }, { "code": "reportUnknownArgumentType", "range": { @@ -39873,6 +39311,14 @@ "lineCount": 1 } }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 34, + "endColumn": 51, + "lineCount": 1 + } + }, { "code": "reportUnknownMemberType", "range": { @@ -40585,14 +40031,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 24, - "lineCount": 1 - } - }, { "code": "reportUnannotatedClassAttribute", "range": { @@ -40801,14 +40239,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 19, - "endColumn": 36, - "lineCount": 1 - } - }, { "code": "reportUnknownArgumentType", "range": { @@ -40833,38 +40263,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 19, - "endColumn": 48, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 65, - "endColumn": 79, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 29, - "endColumn": 60, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -40898,109 +40296,13 @@ } }, { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 33, - "endColumn": 54, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 41, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", + "code": "reportArgumentType", "range": { "startColumn": 12, "endColumn": 73, "lineCount": 1 } }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 58, - "endColumn": 72, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 12, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 39, - "endColumn": 63, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 12, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 36, - "endColumn": 67, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 34, - "endColumn": 70, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 24, - "endColumn": 45, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 24, - "endColumn": 49, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 24, - "endColumn": 50, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 21, - "endColumn": 65, - "lineCount": 4 - } - }, { "code": "reportUnknownArgumentType", "range": { @@ -41084,463 +40386,311 @@ ], "./pyopencl/tools.py": [ { - "code": "reportPossiblyUnboundVariable", - "range": { - "startColumn": 4, - "endColumn": 13, - "lineCount": 1 - } - }, - { - "code": "reportPossiblyUnboundVariable", + "code": "reportMissingTypeStubs", "range": { - "startColumn": 4, - "endColumn": 16, + "startColumn": 9, + "endColumn": 22, "lineCount": 1 } }, { - "code": "reportPossiblyUnboundVariable", + "code": "reportMissingImports", "range": { - "startColumn": 4, - "endColumn": 11, + "startColumn": 9, + "endColumn": 15, "lineCount": 1 } }, { - "code": "reportArgumentType", + "code": "reportUnknownVariableType", "range": { - "startColumn": 47, - "endColumn": 55, + "startColumn": 35, + "endColumn": 46, "lineCount": 1 } }, { - "code": "reportUnknownParameterType", + "code": "reportMissingImports", "range": { - "startColumn": 4, - "endColumn": 38, + "startColumn": 13, + "endColumn": 19, "lineCount": 1 } }, { - "code": "reportUnknownParameterType", + "code": "reportUnknownVariableType", "range": { - "startColumn": 39, - "endColumn": 50, + "startColumn": 27, + "endColumn": 30, "lineCount": 1 } }, { - "code": "reportMissingParameterType", + "code": "reportUnknownArgumentType", "range": { - "startColumn": 39, - "endColumn": 50, + "startColumn": 12, + "endColumn": 66, "lineCount": 1 } }, { "code": "reportUnknownMemberType", "range": { - "startColumn": 15, - "endColumn": 35, + "startColumn": 13, + "endColumn": 37, "lineCount": 1 } }, { - "code": "reportUnknownMemberType", + "code": "reportAttributeAccessIssue", "range": { - "startColumn": 37, - "endColumn": 57, + "startColumn": 23, + "endColumn": 37, "lineCount": 1 } }, { "code": "reportUnknownMemberType", "range": { - "startColumn": 37, - "endColumn": 69, + "startColumn": 39, + "endColumn": 63, "lineCount": 1 } }, { - "code": "reportUnknownMemberType", + "code": "reportUnknownArgumentType", "range": { "startColumn": 16, - "endColumn": 36, - "lineCount": 1 + "endColumn": 47, + "lineCount": 2 } }, { "code": "reportUnknownMemberType", "range": { - "startColumn": 16, - "endColumn": 51, + "startColumn": 17, + "endColumn": 42, "lineCount": 1 } }, { - "code": "reportOptionalMemberAccess", + "code": "reportAttributeAccessIssue", "range": { - "startColumn": 38, - "endColumn": 44, + "startColumn": 27, + "endColumn": 42, "lineCount": 1 } }, { - "code": "reportOptionalMemberAccess", + "code": "reportUnknownMemberType", "range": { - "startColumn": 37, - "endColumn": 46, + "startColumn": 20, + "endColumn": 44, "lineCount": 1 } }, { - "code": "reportOptionalMemberAccess", + "code": "reportMissingImports", "range": { - "startColumn": 29, - "endColumn": 35, + "startColumn": 13, + "endColumn": 19, "lineCount": 1 } }, { - "code": "reportUnknownArgumentType", + "code": "reportUnknownVariableType", "range": { - "startColumn": 43, - "endColumn": 53, + "startColumn": 27, + "endColumn": 30, "lineCount": 1 } }, { "code": "reportUnknownArgumentType", "range": { - "startColumn": 11, - "endColumn": 22, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 8, - "endColumn": 23, + "startColumn": 12, + "endColumn": 71, "lineCount": 1 } }, { - "code": "reportUnknownParameterType", + "code": "reportUnknownMemberType", "range": { - "startColumn": 24, - "endColumn": 33, + "startColumn": 13, + "endColumn": 37, "lineCount": 1 } }, { - "code": "reportMissingParameterType", + "code": "reportAttributeAccessIssue", "range": { - "startColumn": 24, - "endColumn": 33, + "startColumn": 23, + "endColumn": 37, "lineCount": 1 } }, { - "code": "reportUnknownParameterType", + "code": "reportUnknownMemberType", "range": { - "startColumn": 36, - "endColumn": 40, + "startColumn": 39, + "endColumn": 68, "lineCount": 1 } }, { - "code": "reportMissingParameterType", + "code": "reportUnknownArgumentType", "range": { - "startColumn": 36, - "endColumn": 40, - "lineCount": 1 + "startColumn": 16, + "endColumn": 42, + "lineCount": 2 } }, { - "code": "reportUnknownVariableType", + "code": "reportUnknownMemberType", "range": { - "startColumn": 19, - "endColumn": 46, + "startColumn": 17, + "endColumn": 38, "lineCount": 1 } }, { - "code": "reportUnknownVariableType", + "code": "reportAttributeAccessIssue", "range": { - "startColumn": 12, - "endColumn": 20, + "startColumn": 27, + "endColumn": 38, "lineCount": 1 } }, { "code": "reportUnknownMemberType", "range": { - "startColumn": 23, - "endColumn": 44, + "startColumn": 20, + "endColumn": 39, "lineCount": 1 } }, { "code": "reportUnknownArgumentType", - "range": { - "startColumn": 45, - "endColumn": 54, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", "range": { "startColumn": 12, - "endColumn": 18, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 19, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 11, - "endColumn": 26, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 4, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 35, - "endColumn": 43, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 35, - "endColumn": 43, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 45, - "endColumn": 60, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 45, - "endColumn": 60, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 4, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 11, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 22, - "endColumn": 43, - "lineCount": 1 + "endColumn": 47, + "lineCount": 2 } }, { "code": "reportUnknownMemberType", "range": { - "startColumn": 8, - "endColumn": 24, + "startColumn": 13, + "endColumn": 64, "lineCount": 1 } }, { - "code": "reportUnknownVariableType", + "code": "reportAttributeAccessIssue", "range": { - "startColumn": 11, - "endColumn": 20, + "startColumn": 23, + "endColumn": 64, "lineCount": 1 } }, { - "code": "reportUnknownParameterType", + "code": "reportArgumentType", "range": { - "startColumn": 4, - "endColumn": 35, + "startColumn": 27, + "endColumn": 42, "lineCount": 1 } }, { "code": "reportUnknownMemberType", "range": { - "startColumn": 12, - "endColumn": 29, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 13, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 13, - "endColumn": 16, + "startColumn": 4, + "endColumn": 27, "lineCount": 1 } }, { - "code": "reportUnknownArgumentType", + "code": "reportAttributeAccessIssue", "range": { - "startColumn": 23, - "endColumn": 26, + "startColumn": 20, + "endColumn": 27, "lineCount": 1 } }, { - "code": "reportUnknownVariableType", + "code": "reportAttributeAccessIssue", "range": { - "startColumn": 11, + "startColumn": 20, "endColumn": 27, "lineCount": 1 } }, { - "code": "reportUnknownParameterType", + "code": "reportCallIssue", "range": { - "startColumn": 39, - "endColumn": 47, + "startColumn": 20, + "endColumn": 44, "lineCount": 1 } }, { - "code": "reportMissingParameterType", + "code": "reportArgumentType", "range": { - "startColumn": 39, - "endColumn": 47, + "startColumn": 29, + "endColumn": 43, "lineCount": 1 } }, { - "code": "reportUnknownVariableType", + "code": "reportCallIssue", "range": { - "startColumn": 4, - "endColumn": 13, + "startColumn": 24, + "endColumn": 48, "lineCount": 1 } }, { - "code": "reportUnknownArgumentType", + "code": "reportArgumentType", "range": { - "startColumn": 47, - "endColumn": 55, + "startColumn": 33, + "endColumn": 47, "lineCount": 1 } }, { - "code": "reportUnknownVariableType", + "code": "reportMissingTypeStubs", "range": { - "startColumn": 16, - "endColumn": 19, + "startColumn": 13, + "endColumn": 26, "lineCount": 1 } }, { - "code": "reportUnknownVariableType", + "code": "reportUnknownMemberType", "range": { - "startColumn": 4, - "endColumn": 14, + "startColumn": 15, + "endColumn": 35, "lineCount": 1 } }, { - "code": "reportUnknownArgumentType", + "code": "reportReturnType", "range": { - "startColumn": 18, - "endColumn": 54, + "startColumn": 15, + "endColumn": 46, "lineCount": 1 } }, { "code": "reportUnknownVariableType", "range": { - "startColumn": 37, - "endColumn": 41, + "startColumn": 35, + "endColumn": 38, "lineCount": 1 } }, { "code": "reportUnknownVariableType", - "range": { - "startColumn": 16, - "endColumn": 24, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 4, - "endColumn": 24, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 28, - "endColumn": 33, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 28, - "endColumn": 33, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", "range": { "startColumn": 35, "endColumn": 39, @@ -41548,3908 +40698,12 @@ } }, { - "code": "reportMissingParameterType", + "code": "reportUnknownVariableType", "range": { "startColumn": 35, - "endColumn": 39, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 29, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 36, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 49, - "endColumn": 64, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 4, - "endColumn": 26, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 27, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 27, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 68, - "endColumn": 76, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 11, - "endColumn": 24, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 17, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 4, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportMissingImports", - "range": { - "startColumn": 9, - "endColumn": 15, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 35, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportMissingImports", - "range": { - "startColumn": 13, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 27, - "endColumn": 30, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 13, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportAttributeAccessIssue", - "range": { - "startColumn": 23, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 39, - "endColumn": 63, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 17, - "endColumn": 42, - "lineCount": 1 - } - }, - { - "code": "reportAttributeAccessIssue", - "range": { - "startColumn": 27, - "endColumn": 42, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 20, - "endColumn": 44, - "lineCount": 1 - } - }, - { - "code": "reportMissingImports", - "range": { - "startColumn": 13, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 27, - "endColumn": 30, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 13, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportAttributeAccessIssue", - "range": { - "startColumn": 23, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 39, - "endColumn": 68, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 17, - "endColumn": 38, - "lineCount": 1 - } - }, - { - "code": "reportAttributeAccessIssue", - "range": { - "startColumn": 27, - "endColumn": 38, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 20, - "endColumn": 39, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 13, - "endColumn": 64, - "lineCount": 1 - } - }, - { - "code": "reportAttributeAccessIssue", - "range": { - "startColumn": 23, - "endColumn": 64, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 11, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 23, - "endColumn": 29, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 23, - "endColumn": 29, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 24, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 24, - "endColumn": 29, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 24, - "endColumn": 29, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 25, - "endColumn": 30, - "lineCount": 1 - } - }, - { - "code": "reportUnnecessaryContains", - "range": { - "startColumn": 11, - "endColumn": 47, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 20, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 20, - "endColumn": 65, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 26, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 26, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 17, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 40, - "endColumn": 52, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 40, - "endColumn": 60, - "lineCount": 1 - } - }, - { - "code": "reportOptionalMemberAccess", - "range": { - "startColumn": 53, - "endColumn": 58, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 26, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 16, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 32, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 32, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 30, - "endColumn": 39, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 30, - "endColumn": 39, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 15, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 17, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 20, - "endColumn": 29, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 15, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportAttributeAccessIssue", - "range": { - "startColumn": 21, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportAttributeAccessIssue", - "range": { - "startColumn": 21, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 29, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 29, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 28, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 28, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 36, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 36, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 42, - "endColumn": 47, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 42, - "endColumn": 47, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 49, - "endColumn": 56, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 49, - "endColumn": 56, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 4, - "endColumn": 10, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 20, - "endColumn": 32, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 20, - "endColumn": 38, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 20, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 16, - "endColumn": 65, - "lineCount": 1 - } - }, - { - "code": "reportUnknownLambdaType", - "range": { - "startColumn": 23, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportUnknownLambdaType", - "range": { - "startColumn": 42, - "endColumn": 65, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 18, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 20, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 21, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 19, - "endColumn": 30, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 48, - "endColumn": 68, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 26, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 23, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 52, - "endColumn": 72, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 22, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 25, - "endColumn": 45, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 20, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 20, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 16, - "endColumn": 24, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 31, - "endColumn": 42, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 45, - "endColumn": 55, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 57, - "endColumn": 65, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 53, - "endColumn": 64, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 67, - "endColumn": 77, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 22, - "endColumn": 30, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 12, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 21, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 21, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 21, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 21, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 22, - "endColumn": 33, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 20, - "endColumn": 30, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 32, - "endColumn": 33, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 48, - "endColumn": 54, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 29, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 28, - "endColumn": 35, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 21, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 28, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnusedImport", - "range": { - "startColumn": 11, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 4, - "endColumn": 14, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 17, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 17, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportAttributeAccessIssue", - "range": { - "startColumn": 20, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 45, - "endColumn": 51, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 27, - "endColumn": 42, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 27, - "endColumn": 42, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 4, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 23, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 15, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 4, - "endColumn": 11, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 11, - "endColumn": 41, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 27, - "endColumn": 30, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 11, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 24, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportUnusedVariable", - "range": { - "startColumn": 24, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 36, - "endColumn": 52, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 20, - "endColumn": 66, - "lineCount": 5 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 4, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 4, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 22, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 26, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 39, - "endColumn": 50, - "lineCount": 1 - } - }, - { - "code": "reportUnusedVariable", - "range": { - "startColumn": 39, - "endColumn": 50, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 52, - "endColumn": 58, - "lineCount": 1 - } - }, - { - "code": "reportUnusedVariable", - "range": { - "startColumn": 52, - "endColumn": 58, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 28, - "endColumn": 38, - "lineCount": 1 - } - }, - { - "code": "reportUnusedVariable", - "range": { - "startColumn": 28, - "endColumn": 38, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 41, - "endColumn": 52, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 54, - "endColumn": 60, - "lineCount": 1 - } - }, - { - "code": "reportUnusedVariable", - "range": { - "startColumn": 54, - "endColumn": 60, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 28, - "endColumn": 29, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 35, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 28, - "endColumn": 47, - "lineCount": 1 - } - }, - { - "code": "reportCallIssue", - "range": { - "startColumn": 16, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportArgumentType", - "range": { - "startColumn": 25, - "endColumn": 39, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 42, - "lineCount": 1 - } - }, - { - "code": "reportAttributeAccessIssue", - "range": { - "startColumn": 36, - "endColumn": 42, - "lineCount": 1 - } - }, - { - "code": "reportArgumentType", - "range": { - "startColumn": 43, - "endColumn": 61, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 44, - "lineCount": 1 - } - }, - { - "code": "reportAttributeAccessIssue", - "range": { - "startColumn": 38, - "endColumn": 44, - "lineCount": 1 - } - }, - { - "code": "reportArgumentType", - "range": { - "startColumn": 45, - "endColumn": 53, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 44, - "lineCount": 1 - } - }, - { - "code": "reportAttributeAccessIssue", - "range": { - "startColumn": 38, - "endColumn": 44, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 49, - "endColumn": 68, - "lineCount": 1 - } - }, - { - "code": "reportCallIssue", - "range": { - "startColumn": 20, - "endColumn": 44, - "lineCount": 1 - } - }, - { - "code": "reportArgumentType", - "range": { - "startColumn": 29, - "endColumn": 43, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 12, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 16, - "endColumn": 22, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 25, - "endColumn": 35, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 38, - "endColumn": 49, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 51, - "endColumn": 52, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 24, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 33, - "endColumn": 39, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 16, - "endColumn": 26, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 29, - "endColumn": 49, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 30, - "endColumn": 47, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 22, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 22, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 30, - "endColumn": 35, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 30, - "endColumn": 35, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 7, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 61, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 12, - "endColumn": 18, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 35, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 43, - "endColumn": 48, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 8, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 21, - "endColumn": 33, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 21, - "endColumn": 33, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 42, - "endColumn": 62, - "lineCount": 1 - } - }, - { - "code": "reportArgumentType", - "range": { - "startColumn": 42, - "endColumn": 62, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 18, - "endColumn": 21, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 25, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 25, - "endColumn": 43, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 18, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 32, - "endColumn": 52, - "lineCount": 1 - } - }, - { - "code": "reportOptionalSubscript", - "range": { - "startColumn": 32, - "endColumn": 52, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 15, - "endColumn": 21, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 4, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 28, - "endColumn": 32, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 28, - "endColumn": 32, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 4, - "endColumn": 8, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 11, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 11, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 11, - "endColumn": 38, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 23, - "endColumn": 26, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 23, - "endColumn": 26, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 21, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 21, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnusedParameter", - "range": { - "startColumn": 21, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 23, - "endColumn": 26, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 23, - "endColumn": 26, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 8, - "endColumn": 14, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 21, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 21, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 15, - "endColumn": 33, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 23, - "endColumn": 26, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 23, - "endColumn": 26, - "lineCount": 1 - } - }, - { - "code": "reportMissingTypeStubs", - "range": { - "startColumn": 13, - "endColumn": 26, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 21, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 33, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 21, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 21, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 15, - "endColumn": 35, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 23, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 23, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 33, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 33, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 41, - "endColumn": 53, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 41, - "endColumn": 53, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 21, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 17, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 4, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 4, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 23, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 23, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 33, - "endColumn": 45, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 33, - "endColumn": 45, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 47, - "endColumn": 57, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 47, - "endColumn": 57, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 59, - "endColumn": 66, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 59, - "endColumn": 66, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 12, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 12, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 21, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 33, - "endColumn": 45, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 21, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 21, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 29, - "endColumn": 39, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 20, - "endColumn": 33, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 15, - "endColumn": 30, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 29, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 24, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 24, - "endColumn": 43, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 8, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 23, - "endColumn": 26, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 23, - "endColumn": 26, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 19, - "endColumn": 22, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 14, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 17, - "endColumn": 48, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 17, - "endColumn": 60, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 61, - "endColumn": 74, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 19, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 34, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 34, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 39, - "endColumn": 50, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 39, - "endColumn": 50, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 25, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportArgumentType", - "range": { - "startColumn": 25, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 39, - "endColumn": 48, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 44, - "endColumn": 47, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 56, - "endColumn": 68, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 56, - "endColumn": 68, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 26, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 29, - "endColumn": 42, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 29, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 28, - "endColumn": 39, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 8, - "endColumn": 18, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 25, - "endColumn": 33, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 25, - "endColumn": 33, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 23, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 23, - "endColumn": 50, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 28, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 8, - "endColumn": 18, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 25, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 25, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 15, - "endColumn": 43, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 15, - "endColumn": 47, - "lineCount": 4 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 32, - "endColumn": 56, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 32, - "endColumn": 56, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 18, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 4, - "endColumn": 21, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 8, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 36, - "endColumn": 45, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 36, - "endColumn": 45, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 49, - "endColumn": 55, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 49, - "endColumn": 55, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 22, - "endColumn": 32, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 64, - "endColumn": 70, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 24, - "endColumn": 42, - "lineCount": 2 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 24, - "endColumn": 59, - "lineCount": 2 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 24, - "endColumn": 74, - "lineCount": 2 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 60, - "endColumn": 73, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 32, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 32, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 32, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 42, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 42, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 45, - "endColumn": 53, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 55, - "endColumn": 59, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 15, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 47, - "endColumn": 62, - "lineCount": 1 - } - }, - { - "code": "reportArgumentType", - "range": { - "startColumn": 38, - "endColumn": 49, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 29, - "endColumn": 44, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 39, - "endColumn": 54, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 39, - "endColumn": 62, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 55, - "endColumn": 61, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 64, - "endColumn": 70, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 70, - "endColumn": 73, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 30, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 15, - "endColumn": 26, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 37, - "endColumn": 43, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 37, - "endColumn": 43, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 45, - "endColumn": 60, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 45, - "endColumn": 60, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 62, - "endColumn": 71, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 62, - "endColumn": 71, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 25, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 26, - "endColumn": 41, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 42, - "endColumn": 50, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 32, - "endColumn": 41, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 13, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 15, - "endColumn": 17, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 28, - "endColumn": 45, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 28, - "endColumn": 53, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 26, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 55, - "endColumn": 58, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 61, - "endColumn": 65, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 20, - "endColumn": 24, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 26, - "endColumn": 29, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 40, - "endColumn": 57, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 40, - "endColumn": 65, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 23, - "endColumn": 41, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 23, - "endColumn": 41, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 24, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 43, - "endColumn": 59, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 43, - "endColumn": 59, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 4, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 32, - "endColumn": 35, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 32, - "endColumn": 35, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 60, - "endColumn": 63, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 15, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 28, - "endColumn": 51, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 39, - "endColumn": 42, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 39, - "endColumn": 42, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 37, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportOptionalMemberAccess", - "range": { - "startColumn": 67, - "endColumn": 72, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 27, - "endColumn": 39, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 27, - "endColumn": 39, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 41, - "endColumn": 51, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 41, - "endColumn": 51, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 53, - "endColumn": 60, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 53, - "endColumn": 60, - "lineCount": 1 - } - }, - { - "code": "reportUnusedParameter", - "range": { - "startColumn": 53, - "endColumn": 60, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 67, - "endColumn": 74, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 67, - "endColumn": 74, - "lineCount": 1 - } - }, - { - "code": "reportUnusedParameter", - "range": { - "startColumn": 67, - "endColumn": 74, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 39, - "endColumn": 51, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 53, - "endColumn": 63, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 8, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 26, - "endColumn": 33, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 26, - "endColumn": 33, - "lineCount": 1 - } - }, - { - "code": "reportUnusedParameter", - "range": { - "startColumn": 26, - "endColumn": 33, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 36, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 36, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportUnusedParameter", - "range": { - "startColumn": 36, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 44, - "endColumn": 50, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 44, - "endColumn": 50, - "lineCount": 1 - } - }, - { - "code": "reportUnusedParameter", - "range": { - "startColumn": 44, - "endColumn": 50, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 8, - "endColumn": 13, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 20, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 20, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 30, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 30, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 38, - "endColumn": 44, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 38, - "endColumn": 44, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 17, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 42, - "endColumn": 64, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 49, - "endColumn": 63, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 19, - "endColumn": 35, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 19, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 18, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 21, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 38, - "endColumn": 45, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 48, - "endColumn": 52, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 56, - "endColumn": 62, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 19, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 23, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 23, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 18, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 18, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 18, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 21, - "endColumn": 22, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 21, - "endColumn": 22, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 35, - "endColumn": 38, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 19, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 22, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 31, - "endColumn": 41, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 19, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 19, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 22, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 22, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 35, - "endColumn": 39, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 20, - "endColumn": 21, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 23, - "endColumn": 24, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 32, - "endColumn": 42, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 20, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 20, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 27, - "endColumn": 32, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 27, - "endColumn": 32, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 34, - "endColumn": 39, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 21, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 33, - "endColumn": 38, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 40, - "endColumn": 45, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 8, - "endColumn": 14, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 21, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 21, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 35, - "endColumn": 41, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 15, "endColumn": 41, "lineCount": 1 } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 22, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 30, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 17, - "endColumn": 18, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 17, - "endColumn": 18, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 67, - "endColumn": 68, - "lineCount": 1 - } - }, - { - "code": "reportUnusedClass", - "range": { - "startColumn": 6, - "endColumn": 27, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 35, - "endColumn": 43, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 35, - "endColumn": 43, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 45, - "endColumn": 48, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 45, - "endColumn": 48, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 17, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 27, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 28, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 38, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 38, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 17, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 27, - "endColumn": 42, - "lineCount": 1 - } - }, - { - "code": "reportImplicitOverride", - "range": { - "startColumn": 8, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 30, - "endColumn": 38, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 40, - "endColumn": 43, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 23, - "endColumn": 26, - "lineCount": 1 - } } ], "./stubgen/stubgen.py": [