diff --git a/source/controlTypes/processing.py b/source/controlTypes/processing.py index 232b65e7372..ee60fb5be38 100644 --- a/source/controlTypes/processing.py +++ b/source/controlTypes/processing.py @@ -4,7 +4,7 @@ # Copyright (C) 2007-2021 NV Access Limited, Babbage B.V. from enum import Enum, auto -from typing import Any, Dict, List, Optional, Set +from typing import Dict, List, Optional, Set from .role import ROLE, clickableRoles from .state import STATE, STATES_SORTED, negativeStateLabels, stateLabels @@ -177,13 +177,13 @@ def processNegativeStates( def processAndLabelStates( - role: int, - states: Set[Any], + role: ROLE, + states: Set[STATE], reason: OutputReason, - positiveStates: Optional[Set[Any]] = None, - negativeStates: Optional[Set[Any]] = None, - positiveStateLabelDict: Dict[int, str] = {}, - negativeStateLabelDict: Dict[int, str] = {}, + positiveStates: Optional[Set[STATE]] = None, + negativeStates: Optional[Set[STATE]] = None, + positiveStateLabelDict: Dict[STATE, str] = {}, + negativeStateLabelDict: Dict[STATE, str] = {}, ) -> List[str]: """Processes the states for an object and returns the appropriate state labels for both positive and negative states.