@@ -53,9 +53,9 @@ def make_zulip_client() -> zulip.Client:
5353
5454def to_zulip_username (zephyr_username : str ) -> str :
5555 if "@" in zephyr_username :
56- ( user , realm ) = zephyr_username .split ("@" )
56+ user , realm = zephyr_username .split ("@" )
5757 else :
58- ( user , realm ) = (zephyr_username , "ATHENA.MIT.EDU" )
58+ user , realm = (zephyr_username , "ATHENA.MIT.EDU" )
5959 if realm .upper () == "ATHENA.MIT.EDU" :
6060 # Hack to make ctl's fake username setup work :)
6161 if user .lower () == "golem" :
@@ -65,7 +65,7 @@ def to_zulip_username(zephyr_username: str) -> str:
6565
6666
6767def to_zephyr_username (zulip_username : str ) -> str :
68- ( user , realm ) = zulip_username .split ("@" )
68+ user , realm = zulip_username .split ("@" )
6969 if "|" not in user :
7070 # Hack to make ctl's fake username setup work :)
7171 if user .lower () == "ctl" :
@@ -358,7 +358,7 @@ def process_loop(zulip_queue: "Queue[ZephyrDict]", log: Optional[IO[str]]) -> No
358358
359359def parse_zephyr_body (zephyr_data : str , notice_format : str ) -> Tuple [str , str ]:
360360 try :
361- ( zsig , body ) = zephyr_data .split ("\x00 " , 1 )
361+ zsig , body = zephyr_data .split ("\x00 " , 1 )
362362 if notice_format in (
363363 "New transaction [$1] entered in $2\n From: $3 ($5)\n Subject: $4" ,
364364 "New transaction [$1] entered in $2\n From: $3\n Subject: $4" ,
@@ -374,7 +374,7 @@ def parse_zephyr_body(zephyr_data: str, notice_format: str) -> Tuple[str, str]:
374374 fields [3 ],
375375 )
376376 except ValueError :
377- ( zsig , body ) = ( "" , zephyr_data )
377+ zsig , body = "" , zephyr_data
378378 # Clean body of any null characters, since they're invalid in our protocol.
379379 body = body .replace ("\x00 " , "" )
380380 return (zsig , body )
@@ -448,7 +448,7 @@ def process_notice(
448448 notice : zephyr_ctypes .ZNotice_t , zulip_queue : "Queue[ZephyrDict]" , log : Optional [IO [str ]]
449449) -> None :
450450 assert notice .z_sender is not None
451- ( zsig , body ) = parse_zephyr_body (
451+ zsig , body = parse_zephyr_body (
452452 notice .z_message [: notice .z_message_len ].decode (errors = "replace" ),
453453 notice .z_default_format .decode (errors = "replace" ),
454454 )
@@ -852,7 +852,7 @@ class and your mirroring bot does not have access to the relevant \
852852 logger .debug ("Would have forwarded: %r\n %s" , zwrite_args , wrapped_content )
853853 return
854854
855- ( code , stderr ) = send_authed_zephyr (zwrite_args , wrapped_content )
855+ code , stderr = send_authed_zephyr (zwrite_args , wrapped_content )
856856 if code == 0 and stderr == "" :
857857 return
858858 elif code == 0 :
@@ -876,7 +876,7 @@ class and your mirroring bot does not have access to the relevant \
876876 ):
877877 # Retry sending the message unauthenticated; if that works,
878878 # just notify the user that they need to renew their tickets
879- ( code , stderr ) = send_unauthed_zephyr (zwrite_args , wrapped_content )
879+ code , stderr = send_unauthed_zephyr (zwrite_args , wrapped_content )
880880 if code == 0 :
881881 if options .ignore_expired_tickets :
882882 return
@@ -1106,7 +1106,7 @@ def parse_zephyr_subs(verbose: bool = False) -> Set[Tuple[str, str, str]]:
11061106 if len (line ) == 0 :
11071107 continue
11081108 try :
1109- ( cls , instance , recipient ) = line .split ("," )
1109+ cls , instance , recipient = line .split ("," )
11101110 cls = cls .replace ("%me%" , options .user )
11111111 instance = instance .replace ("%me%" , options .user )
11121112 recipient = recipient .replace ("%me%" , options .user )
@@ -1252,7 +1252,7 @@ def die_gracefully(signal: int, frame: Optional[FrameType]) -> None:
12521252
12531253 signal .signal (signal .SIGINT , die_gracefully )
12541254
1255- ( options , args ) = parse_args ()
1255+ options , args = parse_args ()
12561256
12571257 logger = open_logger ()
12581258 configure_logger (logger , "parent" )
0 commit comments