TextAffinity TextAffinity # Bases: Enum Defines the permissions which can be checked and requested. DOWNSTREAM = 'downstream' # The position has affinity for the upstream side of the text position, i.e. in the direction of the beginning of the string. UPSTREAM = 'upstream' # The position has affinity for the downstream side of the text position, i.e. in the direction of the end of the string.