12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- from typing import Callable , Dict , List , Optional
15
+ from typing import Callable , Dict , Optional , Tuple
16
16
17
17
import attr
18
18
@@ -103,7 +103,7 @@ class RoomVersion:
103
103
# is not enough to mark it "supported": the push rule evaluator also needs to
104
104
# support the flag. Unknown flags are ignored by the evaluator, making conditions
105
105
# fail if used.
106
- msc3931_push_features : List [str ] # values from PushRuleRoomFlag
106
+ msc3931_push_features : Tuple [str , ... ] # values from PushRuleRoomFlag
107
107
108
108
109
109
class RoomVersions :
@@ -124,7 +124,7 @@ class RoomVersions:
124
124
msc2716_redactions = False ,
125
125
msc3787_knock_restricted_join_rule = False ,
126
126
msc3667_int_only_power_levels = False ,
127
- msc3931_push_features = [] ,
127
+ msc3931_push_features = () ,
128
128
)
129
129
V2 = RoomVersion (
130
130
"2" ,
@@ -143,7 +143,7 @@ class RoomVersions:
143
143
msc2716_redactions = False ,
144
144
msc3787_knock_restricted_join_rule = False ,
145
145
msc3667_int_only_power_levels = False ,
146
- msc3931_push_features = [] ,
146
+ msc3931_push_features = () ,
147
147
)
148
148
V3 = RoomVersion (
149
149
"3" ,
@@ -162,7 +162,7 @@ class RoomVersions:
162
162
msc2716_redactions = False ,
163
163
msc3787_knock_restricted_join_rule = False ,
164
164
msc3667_int_only_power_levels = False ,
165
- msc3931_push_features = [] ,
165
+ msc3931_push_features = () ,
166
166
)
167
167
V4 = RoomVersion (
168
168
"4" ,
@@ -181,7 +181,7 @@ class RoomVersions:
181
181
msc2716_redactions = False ,
182
182
msc3787_knock_restricted_join_rule = False ,
183
183
msc3667_int_only_power_levels = False ,
184
- msc3931_push_features = [] ,
184
+ msc3931_push_features = () ,
185
185
)
186
186
V5 = RoomVersion (
187
187
"5" ,
@@ -200,7 +200,7 @@ class RoomVersions:
200
200
msc2716_redactions = False ,
201
201
msc3787_knock_restricted_join_rule = False ,
202
202
msc3667_int_only_power_levels = False ,
203
- msc3931_push_features = [] ,
203
+ msc3931_push_features = () ,
204
204
)
205
205
V6 = RoomVersion (
206
206
"6" ,
@@ -219,7 +219,7 @@ class RoomVersions:
219
219
msc2716_redactions = False ,
220
220
msc3787_knock_restricted_join_rule = False ,
221
221
msc3667_int_only_power_levels = False ,
222
- msc3931_push_features = [] ,
222
+ msc3931_push_features = () ,
223
223
)
224
224
MSC2176 = RoomVersion (
225
225
"org.matrix.msc2176" ,
@@ -238,7 +238,7 @@ class RoomVersions:
238
238
msc2716_redactions = False ,
239
239
msc3787_knock_restricted_join_rule = False ,
240
240
msc3667_int_only_power_levels = False ,
241
- msc3931_push_features = [] ,
241
+ msc3931_push_features = () ,
242
242
)
243
243
V7 = RoomVersion (
244
244
"7" ,
@@ -257,7 +257,7 @@ class RoomVersions:
257
257
msc2716_redactions = False ,
258
258
msc3787_knock_restricted_join_rule = False ,
259
259
msc3667_int_only_power_levels = False ,
260
- msc3931_push_features = [] ,
260
+ msc3931_push_features = () ,
261
261
)
262
262
V8 = RoomVersion (
263
263
"8" ,
@@ -276,7 +276,7 @@ class RoomVersions:
276
276
msc2716_redactions = False ,
277
277
msc3787_knock_restricted_join_rule = False ,
278
278
msc3667_int_only_power_levels = False ,
279
- msc3931_push_features = [] ,
279
+ msc3931_push_features = () ,
280
280
)
281
281
V9 = RoomVersion (
282
282
"9" ,
@@ -295,7 +295,7 @@ class RoomVersions:
295
295
msc2716_redactions = False ,
296
296
msc3787_knock_restricted_join_rule = False ,
297
297
msc3667_int_only_power_levels = False ,
298
- msc3931_push_features = [] ,
298
+ msc3931_push_features = () ,
299
299
)
300
300
MSC3787 = RoomVersion (
301
301
"org.matrix.msc3787" ,
@@ -314,7 +314,7 @@ class RoomVersions:
314
314
msc2716_redactions = False ,
315
315
msc3787_knock_restricted_join_rule = True ,
316
316
msc3667_int_only_power_levels = False ,
317
- msc3931_push_features = [] ,
317
+ msc3931_push_features = () ,
318
318
)
319
319
V10 = RoomVersion (
320
320
"10" ,
@@ -333,7 +333,7 @@ class RoomVersions:
333
333
msc2716_redactions = False ,
334
334
msc3787_knock_restricted_join_rule = True ,
335
335
msc3667_int_only_power_levels = True ,
336
- msc3931_push_features = [] ,
336
+ msc3931_push_features = () ,
337
337
)
338
338
MSC2716v4 = RoomVersion (
339
339
"org.matrix.msc2716v4" ,
@@ -352,7 +352,7 @@ class RoomVersions:
352
352
msc2716_redactions = True ,
353
353
msc3787_knock_restricted_join_rule = False ,
354
354
msc3667_int_only_power_levels = False ,
355
- msc3931_push_features = [] ,
355
+ msc3931_push_features = () ,
356
356
)
357
357
MSC1767v10 = RoomVersion (
358
358
# MSC1767 (Extensible Events) based on room version "10"
@@ -372,7 +372,7 @@ class RoomVersions:
372
372
msc2716_redactions = False ,
373
373
msc3787_knock_restricted_join_rule = True ,
374
374
msc3667_int_only_power_levels = True ,
375
- msc3931_push_features = [ PushRuleRoomFlag .EXTENSIBLE_EVENTS ] ,
375
+ msc3931_push_features = ( PushRuleRoomFlag .EXTENSIBLE_EVENTS ,) ,
376
376
)
377
377
378
378
0 commit comments