File tree Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 33import logging
44import random
55import time
6+ from enum import IntEnum
67
78import aiokafka .errors as Errors
89from aiokafka import __version__
4041log = logging .getLogger ("aiokafka" )
4142
4243
43- class ConnectionGroup :
44+ class ConnectionGroup ( IntEnum ) :
4445 DEFAULT = 0
4546 COORDINATION = 1
4647
4748
48- class CoordinationType :
49+ class CoordinationType ( IntEnum ) :
4950 GROUP = 0
5051 TRANSACTION = 1
5152
Original file line number Diff line number Diff line change 1515import uuid
1616import warnings
1717import weakref
18+ from enum import IntEnum
1819
1920import async_timeout
2021
4546SASL_QOP_AUTH = 1
4647
4748
48- class CloseReason :
49+ class CloseReason ( IntEnum ) :
4950 CONNECTION_BROKEN = 0
5051 CONNECTION_TIMEOUT = 1
5152 OUT_OF_SYNC = 2
Original file line number Diff line number Diff line change 1+ from enum import IntEnum
2+
13from aiokafka .metrics .compound_stat import AbstractCompoundStat , NamedMeasurable
24from aiokafka .metrics .measurable import AnonMeasurable
35
46from .histogram import Histogram
57from .sampled_stat import AbstractSampledStat
68
79
8- class BucketSizing :
10+ class BucketSizing ( IntEnum ) :
911 CONSTANT = 0
1012 LINEAR = 1
1113
Original file line number Diff line number Diff line change 11from collections import defaultdict , deque , namedtuple
2- from enum import Enum
2+ from enum import Enum , IntEnum
33
44from aiokafka .structs import TopicPartition
55from aiokafka .util import create_future
@@ -16,7 +16,7 @@ class SubscriptionType(Enum):
1616 USER_ASSIGNED = 4
1717
1818
19- class TransactionResult :
19+ class TransactionResult ( IntEnum ) :
2020 ABORT = 0
2121 COMMIT = 1
2222
You can’t perform that action at this time.
0 commit comments