@@ -11,9 +11,13 @@ def __init__(self, error_code, class_name, message, stack_trace_elements):
1111 self .stack_trace_elements = stack_trace_elements
1212
1313 def __eq__ (self , other ):
14- return isinstance (other , ErrorHolder ) and self .error_code == other .error_code \
15- and self .class_name == other .class_name and self .message == other .message \
16- and self .stack_trace_elements == other .stack_trace_elements
14+ return (
15+ isinstance (other , ErrorHolder )
16+ and self .error_code == other .error_code
17+ and self .class_name == other .class_name
18+ and self .message == other .message
19+ and self .stack_trace_elements == other .stack_trace_elements
20+ )
1721
1822 def __ne__ (self , other ):
1923 return not self .__eq__ (other )
@@ -29,9 +33,13 @@ def __init__(self, class_name, method_name, file_name, line_number):
2933 self .line_number = line_number
3034
3135 def __eq__ (self , other ):
32- return isinstance (other , StackTraceElement ) and self .class_name == other .class_name \
33- and self .method_name == other .method_name and self .file_name == other .file_name \
34- and self .line_number == other .line_number
36+ return (
37+ isinstance (other , StackTraceElement )
38+ and self .class_name == other .class_name
39+ and self .method_name == other .method_name
40+ and self .file_name == other .file_name
41+ and self .line_number == other .line_number
42+ )
3543
3644 def __ne__ (self , other ):
3745 return not self .__eq__ (other )
@@ -53,10 +61,12 @@ def __init__(self, name, seed, group_id):
5361 self .id = group_id
5462
5563 def __eq__ (self , other ):
56- return isinstance (other , RaftGroupId ) \
57- and self .name == other .name \
58- and self .seed == other .seed \
59- and self .id == other .id
64+ return (
65+ isinstance (other , RaftGroupId )
66+ and self .name == other .name
67+ and self .seed == other .seed
68+ and self .id == other .id
69+ )
6070
6171 def __ne__ (self , other ):
6272 return not self .__eq__ (other )
@@ -90,11 +100,25 @@ def as_anchor_list(self, to_object):
90100
91101class PagingPredicateHolder (object ):
92102 __slots__ = (
93- "anchor_data_list_holder" , "predicate_data" , "comparator_data" , "page_size" , "page" , "iteration_type_id" ,
94- "partition_key_data" )
95-
96- def __init__ (self , anchor_data_list_holder , predicate_data , comparator_data , page_size , page , iteration_type_id ,
97- partition_key_data ):
103+ "anchor_data_list_holder" ,
104+ "predicate_data" ,
105+ "comparator_data" ,
106+ "page_size" ,
107+ "page" ,
108+ "iteration_type_id" ,
109+ "partition_key_data" ,
110+ )
111+
112+ def __init__ (
113+ self ,
114+ anchor_data_list_holder ,
115+ predicate_data ,
116+ comparator_data ,
117+ page_size ,
118+ page ,
119+ iteration_type_id ,
120+ partition_key_data ,
121+ ):
98122 self .anchor_data_list_holder = anchor_data_list_holder
99123 self .predicate_data = predicate_data
100124 self .comparator_data = comparator_data
@@ -120,5 +144,12 @@ def of(predicate, to_data):
120144 comparator_data = to_data (predicate .comparator )
121145 iteration_type = predicate .iteration_type
122146
123- return PagingPredicateHolder (anchor_data_list_holder , predicate_data , comparator_data , predicate .page_size ,
124- predicate .page , iteration_type , None )
147+ return PagingPredicateHolder (
148+ anchor_data_list_holder ,
149+ predicate_data ,
150+ comparator_data ,
151+ predicate .page_size ,
152+ predicate .page ,
153+ iteration_type ,
154+ None ,
155+ )
0 commit comments