@@ -79,22 +79,22 @@ def difference(self, *others: Iterable[T]) -> OrderedSet[T]:
79
79
80
80
def difference_update (self , * others : Iterable [T ]) -> None :
81
81
for other in others :
82
- self -= other # type: ignore[operator, arg-type]
82
+ self -= other # type: ignore[arg-type]
83
83
84
84
def update (self , * others : Iterable [T ]) -> None :
85
85
for other in others :
86
- self |= other # type: ignore[operator, arg-type]
86
+ self |= other
87
87
88
88
def intersection (self , * others : Iterable [T ]) -> OrderedSet [T ]:
89
89
res = self .copy ()
90
90
for other in others :
91
91
if other is not self :
92
- res &= other # type: ignore[operator, arg-type]
92
+ res &= other # type: ignore[arg-type]
93
93
return res
94
94
95
95
def intersection_update (self , * others : Iterable [T ]) -> None :
96
96
for other in others :
97
- self &= other # type: ignore[operator, arg-type]
97
+ self &= other # type: ignore[arg-type]
98
98
99
99
def issubset (self , other : Iterable [T ]) -> bool :
100
100
return self <= self ._wrap_iter_in_set (other )
@@ -103,17 +103,17 @@ def issuperset(self, other: Iterable[T]) -> bool:
103
103
return self >= self ._wrap_iter_in_set (other )
104
104
105
105
def symmetric_difference (self , other : Iterable [T ]) -> OrderedSet [T ]:
106
- return self ^ other # type: ignore[operator, arg-type ]
106
+ return self ^ other # type: ignore[operator]
107
107
108
108
def symmetric_difference_update (self , other : Iterable [T ]) -> None :
109
- self ^= other # type: ignore[operator, arg-type]
109
+ self ^= other # type: ignore[arg-type]
110
110
111
111
def union (self , * others : Iterable [T ]) -> OrderedSet [T ]:
112
112
res = self .copy ()
113
113
for other in others :
114
114
if other is self :
115
115
continue
116
- res |= other # type: ignore[operator, arg-type]
116
+ res |= other
117
117
return res
118
118
119
119
# Specify here for correct type inference, otherwise would
@@ -132,15 +132,15 @@ def __ior__(self, other: Iterable[T]) -> OrderedSet[T]: # type: ignore[misc, ov
132
132
return self
133
133
return super ().__ior__ (other ) # type: ignore[arg-type]
134
134
135
- def __eq__ (self , other : AbstractSet [ T ] ) -> bool : # type: ignore[misc, override]
135
+ def __eq__ (self , other : object ) -> bool :
136
136
if isinstance (other , OrderedSet ):
137
137
return self ._dict == other ._dict
138
- return super ().__eq__ (other ) # type: ignore[arg-type]
138
+ return super ().__eq__ (other )
139
139
140
- def __ne__ (self , other : AbstractSet [ T ] ) -> bool : # type: ignore[misc, override]
140
+ def __ne__ (self , other : object ) -> bool :
141
141
if isinstance (other , OrderedSet ):
142
142
return self ._dict != other ._dict
143
- return super ().__ne__ (other ) # type: ignore[arg-type]
143
+ return super ().__ne__ (other )
144
144
145
145
def __or__ (self , other : AbstractSet [T_co ]) -> OrderedSet [T ]:
146
146
return cast (OrderedSet [T ], super ().__or__ (other ))
0 commit comments