Skip to content

Commit

Permalink
use BACK_COMPAT_TO
Browse files Browse the repository at this point in the history
  • Loading branch information
seanbudd committed Jun 15, 2021
1 parent 61ec5eb commit 740dfb7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/controlTypes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# See the file COPYING for more details.
# Copyright (C) 2007-2021 NV Access Limited, Babbage B.V.

from buildVersion import version_year
from addonAPIVersion import BACK_COMPAT_TO

# imports used in __all__
from .isCurrent import IsCurrent
Expand All @@ -29,13 +29,13 @@

# Added to maintain backwards compatibility, marked for deprecation to be removed in 2022.1
# usages to be replaced by Role.*.displayString and State.*.displayString
if version_year < 2022:
if BACK_COMPAT_TO[0] < 2022:
roleLabels = _roleLabels
stateLabels = _stateLabels


# Added to maintain backwards compatibility, marked for deprecation to be removed in 2022.1
if version_year < 2022:
if BACK_COMPAT_TO[0] < 2022:
ROLE_UNKNOWN = Role.UNKNOWN
ROLE_WINDOW = Role.WINDOW
ROLE_TITLEBAR = Role.TITLEBAR
Expand Down Expand Up @@ -190,7 +190,7 @@


# Added to maintain backwards compatibility, marked for deprecation to be removed in 2022.1
if version_year < 2022:
if BACK_COMPAT_TO[0] < 2022:
STATE_UNAVAILABLE = State.UNAVAILABLE
STATE_FOCUSED = State.FOCUSED
STATE_SELECTED = State.SELECTED
Expand Down

0 comments on commit 740dfb7

Please sign in to comment.