diff --git a/source/UIAHandler/_remoteOps/remoteAlgorithms.py b/source/UIAHandler/_remoteOps/remoteAlgorithms.py index 7998162c3f5..8f94200ef16 100644 --- a/source/UIAHandler/_remoteOps/remoteAlgorithms.py +++ b/source/UIAHandler/_remoteOps/remoteAlgorithms.py @@ -4,31 +4,20 @@ # Copyright (C) 2023-2023 NV Access Limited from __future__ import annotations -import typing from collections.abc import Generator -from comtypes import GUID from .remoteFuncWrapper import ( - remoteFunc, remoteContextManager ) from .remoteAPI import ( RemoteAPI, - RemoteUint, - RemoteInt, RemoteIntEnum, - RemoteString, - RemoteArray, - RemoteExtensionTarget, - RemoteElement, - RemoteTextRange, - RemoteVariant + RemoteTextRange ) from .lowLevel import ( - TextUnit, - AttributeId, - StyleId + TextUnit ) + @remoteContextManager def remote_forEachUnitInTextRange( ra: RemoteAPI, diff --git a/source/UIAHandler/remote.py b/source/UIAHandler/remote.py index eb643804c71..4301e9345d7 100644 --- a/source/UIAHandler/remote.py +++ b/source/UIAHandler/remote.py @@ -151,13 +151,3 @@ def code(ra: remoteAPI.RemoteAPI): cast(str, label), cast(UIA.IUIAutomationTextRange, paragraphRange) ) - -def test(): - op = operation.Operation(enableCompiletimeLogging=True) - @op.buildIterableFunction - def code(ra: remoteAPI.RemoteAPI): - counter = ra.newInt(0, static=True) - with ra.whileBlock(lambda: counter < 20000): - with ra.ifBlock((counter % 1000) == 0): - ra.Yield(counter) - counter += 1