Skip to content

Commit

Permalink
ignore typing where it can not be matched
Browse files Browse the repository at this point in the history
  • Loading branch information
rodja committed Jul 22, 2024
1 parent fbac287 commit 687701e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nicegui/testing/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,11 @@ def _gather_elements(self,
content: Union[str, list[str], None] = None,
) -> Set[T]:
if target is None:
if kind is None:
return set(ElementFilter(marker=marker, content=content)) # type: ignore
return set(ElementFilter(kind=kind, marker=marker, content=content))
elif isinstance(target, str):
return set(ElementFilter(marker=target)).union(ElementFilter(content=target))
return set(ElementFilter(marker=target)).union(ElementFilter(content=target)) # type: ignore
else:
return set(ElementFilter(kind=target))

Expand Down

0 comments on commit 687701e

Please sign in to comment.