From 57c994d7310dc24c8bcbdf61816e146c99255ffe Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Tue, 5 Aug 2025 11:06:24 +0300 Subject: [PATCH 1/3] feat(typing): add annotations to spatial_btree --- pytools/spatial_btree.py | 148 +++++++++++++++++++++++++++++---------- 1 file changed, 110 insertions(+), 38 deletions(-) diff --git a/pytools/spatial_btree.py b/pytools/spatial_btree.py index 0b267415..fbd639f2 100644 --- a/pytools/spatial_btree.py +++ b/pytools/spatial_btree.py @@ -1,34 +1,68 @@ +""" +Spatial Binary Tree +=================== + +.. autoclass:: Point +.. autoclass:: Element +.. autoclass:: BoundingBox +.. autoclass:: SpatialBinaryTree + +.. autoclass:: SpatialBinaryTreeBucket +""" + from __future__ import annotations +from typing import TYPE_CHECKING, Any, TextIO, TypeAlias, cast + import numpy as np -def do_boxes_intersect(bl, tr): +if TYPE_CHECKING: + from collections.abc import Iterator + +Point: TypeAlias = np.ndarray[tuple[int], np.dtype[np.floating]] +Element: TypeAlias = Any +BoundingBox: TypeAlias = tuple[Point, Point] +SpatialBinaryTree: TypeAlias = ( + "SpatialBinaryTreeBucket | tuple[SpatialBinaryTree, SpatialBinaryTree]") + + +def do_boxes_intersect(bl: BoundingBox, tr: BoundingBox) -> bool: (bl1, tr1) = bl (bl2, tr2) = tr (dimension,) = bl1.shape return all(max(bl1[i], bl2[i]) <= min(tr1[i], tr2[i]) for i in range(dimension)) -def make_buckets(bottom_left, top_right, allbuckets, max_elements_per_box): +def make_buckets( + bottom_left: Point, + top_right: Point, + allbuckets: list[SpatialBinaryTreeBucket], + max_elements_per_box: int + ) -> SpatialBinaryTree: (dimensions,) = bottom_left.shape - half = (top_right - bottom_left) / 2. - def do(dimension, pos): + def do(dimension: int, pos: Point) -> SpatialBinaryTree: if dimension == dimensions: - origin = bottom_left + pos*half - bucket = SpatialBinaryTreeBucket(origin, origin + half, + origin = bottom_left + pos * half + bucket = SpatialBinaryTreeBucket( + origin, + origin + half, max_elements_per_box=max_elements_per_box) + allbuckets.append(bucket) return bucket + pos[dimension] = 0 first = do(dimension + 1, pos) + pos[dimension] = 1 second = do(dimension + 1, pos) - return [first, second] - return do(0, np.zeros((dimensions,), np.float64)) + return first, second + + return do(0, np.zeros((dimensions,), dtype=bottom_left.dtype)) class SpatialBinaryTreeBucket: @@ -36,50 +70,74 @@ class SpatialBinaryTreeBucket: It automatically decides whether it needs to create more subdivisions beneath itself or not. - .. attribute:: elements + .. autoattribute:: elements + + .. autoattribute:: bottom_left + .. autoattribute:: top_right + .. autoattribute:: center + .. autoattribute:: max_elements_per_box + + .. automethod:: insert + .. automethod:: generate_matches + .. automethod:: visualize + .. automethod:: plot + """ - a list of tuples *(element, bbox)* where bbox is again - a tuple *(lower_left, upper_right)* of :class:`numpy.ndarray` instances - satisfying ``(lower_right <= upper_right).all()``. + elements: list[tuple[Element, BoundingBox]] + """A list of tuples *(element, bbox)* where bbox is again a tuple + *(lower_left, upper_right)* of :class:`numpy.ndarray` instances + satisfying ``(lower_right <= upper_right).all()``. """ - def __init__(self, bottom_left, top_right, max_elements_per_box=None): - """:param bottom_left: A :mod: 'numpy' array of the minimal coordinates - of the box being partitioned. - :param top_right: A :mod: 'numpy' array of the maximal coordinates of - the box being partitioned.""" + bottom_left: Point + top_right: Point + center: Point + max_elements_per_box: int - self.elements = [] + buckets: SpatialBinaryTree | None + all_buckets: list[SpatialBinaryTreeBucket] | None + + def __init__(self, + bottom_left: Point, + top_right: Point, + max_elements_per_box: int | None = None) -> None: + """ + :param bottom_left: a :mod:`numpy.ndarray` of the minimal coordinates + of the box being partitioned. + :param top_right: a :mod:`numpy.ndarray` array of the maximal coordinates + of the box being partitioned. + """ self.bottom_left = bottom_left self.top_right = top_right self.center = (bottom_left + top_right) / 2 # As long as buckets is None, there are no subdivisions - self.buckets = None self.elements = [] + self.buckets = None + self.all_buckets = None if max_elements_per_box is None: dimensions, = self.bottom_left.shape - max_elements_per_box = 8 * 2**dimensions + max_elements_per_box = cast("int", 8 * 2**dimensions) self.max_elements_per_box = max_elements_per_box - def insert(self, element, bbox): + def insert(self, element: Element, bbox: BoundingBox) -> None: """Insert an element into the spatial tree. :param element: the element to be stored in the retrieval data - structure. It is treated as opaque and no assumptions are made on it. + structure. It is treated as opaque and no assumptions are made on it. - :param bbox: A bounding box supplied as a tuple *lower_left, - upper_right* of :mod:`numpy` vectors, such that *(lower_right <= - upper_right).all()*. - - Despite these names, the bounding box (and this entire data structure) - may be of any dimension. + :param bbox: a bounding box supplied as a tuple ``(bottom_left, top_right)`` + of :mod:`numpy` vectors, such that ``(bottom_left <= top_right).all()``. + Despite these names, the bounding box (and this entire data structure) + may be of any dimension. """ - def insert_into_subdivision(element, bbox): + def insert_into_subdivision(element: Element, bbox: BoundingBox) -> None: + assert self.all_buckets is not None + bucket_matches = [ ibucket for ibucket, bucket in enumerate(self.all_buckets) @@ -122,35 +180,48 @@ def insert_into_subdivision(element, bbox): # Go find which sudivision to place element insert_into_subdivision(element, bbox) - def generate_matches(self, point): + def generate_matches(self, point: Point) -> Iterator[Element]: if self.buckets: # We have subdivisions. Use them. (dimensions,) = point.shape bucket = self.buckets for dim in range(dimensions): + assert isinstance(bucket, tuple) bucket = bucket[0] if point[dim] < self.center[dim] else bucket[1] + assert isinstance(bucket, SpatialBinaryTreeBucket) yield from bucket.generate_matches(point) # Perform linear search. for el, _ in self.elements: yield el - def visualize(self, file): + def visualize(self, file: TextIO) -> None: file.write(f"{self.bottom_left[0]:f} {self.bottom_left[1]:f}\n") file.write(f"{self.top_right[0]:f} {self.bottom_left[1]:f}\n") file.write(f"{self.top_right[0]:f} {self.top_right[1]:f}\n") file.write(f"{self.bottom_left[0]:f} {self.top_right[1]:f}\n") file.write(f"{self.bottom_left[0]:f} {self.bottom_left[1]:f}\n\n") + if self.buckets: + assert self.all_buckets is not None for i in self.all_buckets: i.visualize(file) - def plot(self, **kwargs): - import matplotlib.patches as mpatches - import matplotlib.pyplot as pt + def plot(self, **kwargs: Any) -> None: + """ + :param ax: an :class:`~matplotlib.axes.Axes` object on which to plot the tree. + :param kwargs: any remaining arguments are passed to + :class:`matplotlib.patches.PathPatch`. + """ + import matplotlib.pyplot as plt + from matplotlib.patches import PathPatch from matplotlib.path import Path + ax = kwargs.pop("ax", None) + if ax is None: + ax = plt.gca() + el = self.bottom_left eh = self.top_right pathdata = [ @@ -163,9 +234,10 @@ def plot(self, **kwargs): codes, verts = zip(*pathdata, strict=True) path = Path(verts, codes) - patch = mpatches.PathPatch(path, **kwargs) - pt.gca().add_patch(patch) + patch = PathPatch(path, **kwargs) + ax.add_patch(patch) if self.buckets: - for i in self.all_buckets: - i.plot(**kwargs) + assert self.all_buckets is not None + for bucket in self.all_buckets: + bucket.plot(ax=ax, **kwargs) From af4835dbb70f1dd8f933a5b4364f9aa5073186e6 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Tue, 5 Aug 2025 11:06:34 +0300 Subject: [PATCH 2/3] docs: add spatial_btree to docs --- doc/conf.py | 4 ++++ doc/reference.rst | 1 + 2 files changed, 5 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index e81cd7ec..e06e9ddc 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -20,6 +20,7 @@ intersphinx_mapping = { "loopy": ("https://documen.tician.de/loopy", None), + "matplotlib": ("https://matplotlib.org/stable/", None), "numpy": ("https://numpy.org/doc/stable", None), "platformdirs": ("https://platformdirs.readthedocs.io/en/latest", None), "pymbolic": ("https://documen.tician.de/pymbolic", None), @@ -41,7 +42,10 @@ "np.ndarray": "class:numpy.ndarray", "np.floating": "class:numpy.floating", # pytools typing + "BoundingBox": "obj:pytools.spatial_btree.BoundingBox", + "Element": "obj:pytools.spatial_btree.Element", "ObjectArray1D": "obj:pytools.obj_array.ObjectArray1D", + "Point": "obj:pytools.spatial_btree.Point", "ReadableBuffer": "data:pytools.ReadableBuffer", } diff --git a/doc/reference.rst b/doc/reference.rst index d18c2c5e..137f6e93 100644 --- a/doc/reference.rst +++ b/doc/reference.rst @@ -1,4 +1,5 @@ .. automodule:: pytools + .. automodule:: pytools.datatable .. automodule:: pytools.graphviz From 1ae34f69f16e0f4117c30e6b68a727df98b50e4e Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Tue, 5 Aug 2025 11:06:48 +0300 Subject: [PATCH 3/3] chore: update baseline --- .basedpyright/baseline.json | 1232 +---------------------------------- 1 file changed, 28 insertions(+), 1204 deletions(-) diff --git a/.basedpyright/baseline.json b/.basedpyright/baseline.json index 8a6b9866..3c8f7069 100644 --- a/.basedpyright/baseline.json +++ b/.basedpyright/baseline.json @@ -10630,1143 +10630,71 @@ ], "./pytools/spatial_btree.py": [ { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 23, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 23, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 27, - "endColumn": 29, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 27, - "endColumn": 29, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 5, - "endColumn": 8, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 10, - "endColumn": 13, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 5, - "endColumn": 8, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 10, - "endColumn": 13, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 5, - "endColumn": 14, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 19, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 15, - "endColumn": 83, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 19, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 27, - "endColumn": 33, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 42, - "endColumn": 48, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 50, - "endColumn": 56, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 73, - "endColumn": 82, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 4, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 17, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 17, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 30, - "endColumn": 39, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 30, - "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": 73, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 53, - "endColumn": 73, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 5, - "endColumn": 15, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 20, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 4, - "endColumn": 8, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 8, - "endColumn": 10, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 11, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 11, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 22, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 22, - "endColumn": 25, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 18, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 45, - "endColumn": 51, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 53, - "endColumn": 66, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 41, - "endColumn": 61, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 12, - "endColumn": 29, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 19, - "endColumn": 32, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 34, - "endColumn": 37, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 8, - "endColumn": 14, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 20, - "endColumn": 33, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 35, - "endColumn": 38, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 15, - "endColumn": 30, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 11, - "endColumn": 53, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 26, - "endColumn": 39, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 23, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 23, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 36, - "endColumn": 45, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 36, - "endColumn": 45, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 47, - "endColumn": 67, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 47, - "endColumn": 67, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 21, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 24, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 22, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 19, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 20, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 22, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 26, - "endColumn": 48, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 32, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 33, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 13, - "endColumn": 33, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 21, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 21, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 30, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 30, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 36, - "endColumn": 43, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 36, - "endColumn": 43, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 45, - "endColumn": 49, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 45, - "endColumn": 49, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 29, - "endColumn": 35, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 49, - "endColumn": 65, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 49, - "endColumn": 65, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 39, - "endColumn": 57, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 59, - "endColumn": 75, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 78, - "endColumn": 82, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 41, - "endColumn": 57, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 41, - "endColumn": 57, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 29, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 29, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 20, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 20, - "endColumn": 58, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 11, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 19, - "endColumn": 32, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 19, - "endColumn": 32, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 36, - "endColumn": 61, - "lineCount": 1 - } - }, - { - "code": "reportUnannotatedClassAttribute", - "range": { - "startColumn": 21, - "endColumn": 32, - "lineCount": 1 - } - }, - { - "code": "reportUninitializedInstanceVariable", - "range": { - "startColumn": 21, - "endColumn": 32, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 24, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 42, - "endColumn": 56, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 24, - "endColumn": 40, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 45, - "endColumn": 70, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 45, - "endColumn": 70, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 31, - "endColumn": 44, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 20, - "endColumn": 22, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 24, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 44, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 48, - "endColumn": 55, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 40, - "endColumn": 47, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 49, - "endColumn": 53, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 29, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 16, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 36, - "endColumn": 43, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 45, - "endColumn": 49, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 8, - "endColumn": 24, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 31, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 31, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 11, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 13, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 28, - "endColumn": 39, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 12, - "endColumn": 18, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 21, - "endColumn": 33, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 29, - "endColumn": 39, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 16, - "endColumn": 22, - "lineCount": 1 - } - }, - { - "code": "reportIndexIssue", - "range": { - "startColumn": 25, - "endColumn": 31, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 51, - "endColumn": 62, - "lineCount": 1 - } - }, - { - "code": "reportIndexIssue", - "range": { - "startColumn": 73, - "endColumn": 79, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 23, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 23, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportAttributeAccessIssue", - "range": { - "startColumn": 30, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportAttributeAccessIssue", - "range": { - "startColumn": 30, - "endColumn": 46, - "lineCount": 1 - } - }, - { - "code": "reportAttributeAccessIssue", + "code": "reportAny", "range": { - "startColumn": 30, - "endColumn": 46, + "startColumn": 19, + "endColumn": 25, "lineCount": 1 } }, { - "code": "reportUnknownArgumentType", + "code": "reportAny", "range": { - "startColumn": 47, - "endColumn": 52, + "startColumn": 27, + "endColumn": 33, "lineCount": 1 } }, { - "code": "reportUnknownVariableType", + "code": "reportAny", "range": { - "startColumn": 12, - "endColumn": 14, + "startColumn": 42, + "endColumn": 48, "lineCount": 1 } }, { - "code": "reportUnknownVariableType", + "code": "reportAny", "range": { - "startColumn": 16, - "endColumn": 17, + "startColumn": 50, + "endColumn": 56, "lineCount": 1 } }, { - "code": "reportUnknownMemberType", + "code": "reportAny", "range": { "startColumn": 21, - "endColumn": 34, - "lineCount": 1 - } - }, - { - "code": "reportUnknownParameterType", - "range": { - "startColumn": 24, - "endColumn": 28, - "lineCount": 1 - } - }, - { - "code": "reportMissingParameterType", - "range": { - "startColumn": 24, "endColumn": 28, "lineCount": 1 } }, { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 18, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 18, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 18, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 18, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 18, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 11, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 16, - "endColumn": 17, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", + "code": "reportAny", "range": { - "startColumn": 21, - "endColumn": 37, + "startColumn": 36, + "endColumn": 43, "lineCount": 1 } }, { - "code": "reportUnknownMemberType", + "code": "reportAny", "range": { - "startColumn": 16, - "endColumn": 27, + "startColumn": 20, + "endColumn": 22, "lineCount": 1 } }, { - "code": "reportUnknownParameterType", + "code": "reportAny", "range": { - "startColumn": 21, - "endColumn": 27, + "startColumn": 12, + "endColumn": 14, "lineCount": 1 } }, { - "code": "reportMissingParameterType", + "code": "reportAny", "range": { "startColumn": 21, "endColumn": 27, @@ -11774,106 +10702,18 @@ } }, { - "code": "reportUnknownVariableType", + "code": "reportAny", "range": { "startColumn": 8, - "endColumn": 16, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 28, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 28, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 28, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 28, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 28, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 28, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 28, - "endColumn": 36, - "lineCount": 1 - } - }, - { - "code": "reportUnknownArgumentType", - "range": { - "startColumn": 43, - "endColumn": 49, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 11, - "endColumn": 23, - "lineCount": 1 - } - }, - { - "code": "reportUnknownVariableType", - "range": { - "startColumn": 16, - "endColumn": 17, - "lineCount": 1 - } - }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 21, - "endColumn": 37, + "endColumn": 10, "lineCount": 1 } }, { - "code": "reportUnknownMemberType", + "code": "reportAny", "range": { - "startColumn": 16, - "endColumn": 22, + "startColumn": 34, + "endColumn": 40, "lineCount": 1 } } @@ -14165,14 +13005,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 19, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": { @@ -14181,14 +13013,6 @@ "lineCount": 1 } }, - { - "code": "reportUnknownMemberType", - "range": { - "startColumn": 8, - "endColumn": 17, - "lineCount": 1 - } - }, { "code": "reportUnknownMemberType", "range": {