diff --git a/.basedpyright/baseline.json b/.basedpyright/baseline.json index 6c065401..d297de4c 100644 --- a/.basedpyright/baseline.json +++ b/.basedpyright/baseline.json @@ -27537,6 +27537,14 @@ "lineCount": 1 } }, + { + "code": "reportUnknownMemberType", + "range": { + "startColumn": 19, + "endColumn": 51, + "lineCount": 1 + } + }, { "code": "reportUnknownMemberType", "range": { @@ -27545,6 +27553,14 @@ "lineCount": 1 } }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 24, + "endColumn": 51, + "lineCount": 1 + } + }, { "code": "reportAttributeAccessIssue", "range": { @@ -27553,6 +27569,14 @@ "lineCount": 1 } }, + { + "code": "reportUnknownMemberType", + "range": { + "startColumn": 19, + "endColumn": 51, + "lineCount": 1 + } + }, { "code": "reportUnknownMemberType", "range": { @@ -27561,6 +27585,14 @@ "lineCount": 1 } }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 24, + "endColumn": 51, + "lineCount": 1 + } + }, { "code": "reportAttributeAccessIssue", "range": { @@ -27569,6 +27601,22 @@ "lineCount": 1 } }, + { + "code": "reportUnknownMemberType", + "range": { + "startColumn": 19, + "endColumn": 47, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 24, + "endColumn": 47, + "lineCount": 1 + } + }, { "code": "reportUnknownMemberType", "range": { @@ -27617,6 +27665,14 @@ "lineCount": 1 } }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 21, + "endColumn": 25, + "lineCount": 1 + } + }, { "code": "reportCallIssue", "range": { diff --git a/boxtree/traversal.py b/boxtree/traversal.py index 7622257f..f20d2c2c 100644 --- a/boxtree/traversal.py +++ b/boxtree/traversal.py @@ -70,7 +70,7 @@ # NOTE: Tree cannot go into the TYPE_CHECKING block because it is needed # by `dataclass_array_container` (which evals the types) -from boxtree.tree import Tree # noqa: TC001 +from boxtree.tree import Tree, TreeOfBoxes # noqa: TC001 if TYPE_CHECKING: @@ -1760,8 +1760,9 @@ def get_kernel_info(self, *, source_boxes_has_mask: bool, source_parent_boxes_has_mask: bool, debug: bool = False) -> _KernelInfo: - # FIXME: not clear this is the right default? if particle_id_dtype is None: + # This only happens for TreeOfBoxes, where there is no particle info + assert not (sources_have_extent or targets_have_extent) particle_id_dtype = np.dtype(np.int32) # {{{ process from_sep_smaller_crit @@ -1961,7 +1962,7 @@ def get_kernel_info(self, *, def __call__(self, actx: ArrayContext, - tree: Tree, + tree: Tree | TreeOfBoxes, wait_for: cl.WaitList = None, debug: bool = False, _from_sep_smaller_min_nsources_cumul: int | None = None,