1212
1313
1414# global variables
15- app_client : EthAppClient = None
15+ app_client : EthAppClient = None # type: ignore[assignment]
1616filtering_paths : dict = {}
1717filtering_tokens : list [dict ] = []
1818filtering_calldatas : list [dict ] = []
@@ -113,6 +113,7 @@ def send_struct_def_field(typename, keyname):
113113 pass
114114
115115 response = app_client .response ()
116+ assert response is not None
116117 assert response .status == StatusWord .SWO_SUCCESS , \
117118 f"Error sending field def { keyname } of type { typename } : { response .status } "
118119
@@ -284,6 +285,7 @@ def send_struct_impl_field(value, field):
284285 callback ()
285286
286287 response = app_client .response ()
288+ assert response is not None
287289 assert response .status == StatusWord .SWO_SUCCESS , \
288290 f"Error sending field { field ['name' ]} of type { field ['type' ]} : { response .status } "
289291
@@ -297,13 +299,15 @@ def evaluate_field(structs, data, field, lvls_left, new_level=True):
297299 with app_client .eip712_send_struct_impl_array (len (data )):
298300 pass
299301 response = app_client .response ()
302+ assert response is not None
300303 assert response .status == StatusWord .SWO_SUCCESS , \
301304 f"Error sending array { field ['name' ]} of type { field ['type' ]} : { response .status } "
302305 if len (data ) == 0 :
303306 for path in filtering_paths .keys ():
304307 dpath = "." .join (current_path ) + ".[]"
305308 if path .startswith (dpath ):
306309 response = app_client .eip712_filtering_discarded_path (path )
310+ assert response is not None
307311 assert response .status == StatusWord .SWO_SUCCESS , \
308312 f"Error sending discarded path { path } : { response .status } "
309313 send_filter (path , True )
@@ -355,6 +359,7 @@ def send_filtering_message_info(display_name: str, filters_count: int):
355359 with app_client .eip712_filtering_message_info (display_name , filters_count , sig ):
356360 pass
357361 response = app_client .response ()
362+ assert response is not None
358363 assert response .status == StatusWord .SWO_SUCCESS , \
359364 f"Error sending filtering message info for { display_name } : { response .status } "
360365
@@ -367,6 +372,7 @@ def send_filtering_amount_join_token(path: str, join_id: int, discarded: bool):
367372 with app_client .eip712_filtering_amount_join_token (join_id , sig , discarded ):
368373 pass
369374 response = app_client .response ()
375+ assert response is not None
370376 assert response .status == StatusWord .SWO_SUCCESS , \
371377 f"Error sending filtering amount join token for { path } with token index { join_id } : { response .status } "
372378
@@ -380,6 +386,7 @@ def send_filtering_amount_join_value(path: str, join_id: int, display_name: str,
380386 with app_client .eip712_filtering_amount_join_value (join_id , display_name , sig , discarded ):
381387 pass
382388 response = app_client .response ()
389+ assert response is not None
383390 assert response .status == StatusWord .SWO_SUCCESS , \
384391 f"Error sending filtering amount join value for { path } with token index { join_id } : { response .status } "
385392
@@ -392,6 +399,7 @@ def send_filtering_datetime(path: str, display_name: str, discarded: bool):
392399 with app_client .eip712_filtering_datetime (display_name , sig , discarded ):
393400 pass
394401 response = app_client .response ()
402+ assert response is not None
395403 assert response .status == StatusWord .SWO_SUCCESS , \
396404 f"Error sending filtering datetime for { path } : { response .status } "
397405
@@ -412,6 +420,7 @@ def send_filtering_trusted_name(path: str,
412420 with app_client .eip712_filtering_trusted_name (display_name , name_type , name_source , sig , discarded ):
413421 pass
414422 response = app_client .response ()
423+ assert response is not None
415424 assert response .status == StatusWord .SWO_SUCCESS , \
416425 f"Error sending filtering trusted name for { path } : { response .status } "
417426
@@ -513,6 +522,7 @@ def send_filtering_raw(path: str, display_name: str, discarded: bool):
513522 with app_client .eip712_filtering_raw (display_name , sig , discarded ):
514523 pass
515524 response = app_client .response ()
525+ assert response is not None
516526 assert response .status == StatusWord .SWO_SUCCESS , \
517527 f"Error sending filtering raw for { path } : { response .status } "
518528
@@ -604,6 +614,7 @@ def process_data(aclient: EthAppClient,
604614 with app_client .eip712_send_struct_def_struct_name (key ):
605615 pass
606616 response = app_client .response ()
617+ assert response is not None
607618 assert response .status == StatusWord .SWO_SUCCESS , \
608619 f"Error sending struct def { key } : { response .status } "
609620 for f in types [key ]:
@@ -614,6 +625,7 @@ def process_data(aclient: EthAppClient,
614625 with app_client .eip712_filtering_activate ():
615626 pass
616627 response = app_client .response ()
628+ assert response is not None
617629 assert response .status == StatusWord .SWO_SUCCESS , \
618630 f"Error activating filtering: { response .status } "
619631 prepare_filtering (data_json , filters )
@@ -626,6 +638,7 @@ def process_data(aclient: EthAppClient,
626638 with app_client .eip712_send_struct_impl_root_struct (domain_typename ):
627639 pass
628640 response = app_client .response ()
641+ assert response is not None
629642 assert response .status == StatusWord .SWO_SUCCESS , \
630643 f"Error sending domain root struct { domain_typename } : { response .status } "
631644 send_struct_impl (types , domain , domain_typename )
@@ -640,6 +653,7 @@ def process_data(aclient: EthAppClient,
640653 with app_client .eip712_send_struct_impl_root_struct (message_typename ):
641654 pass
642655 response = app_client .response ()
656+ assert response is not None
643657 assert response .status == StatusWord .SWO_SUCCESS , \
644658 f"Error sending message root struct { message_typename } : { response .status } "
645659 send_struct_impl (types , message , message_typename )
0 commit comments