@@ -504,9 +504,9 @@ def verify_custom(synapse: MyCustomSynapse):
504504 )
505505
506506 param_class = first_param .annotation
507- assert issubclass (
508- param_class , Synapse
509- ), "The first argument of forward_fn must inherit from bittensor.Synapse"
507+ assert issubclass (param_class , Synapse ), (
508+ "The first argument of forward_fn must inherit from bittensor. Synapse"
509+ )
510510 request_name = param_class .__name__
511511
512512 async def endpoint (* args , ** kwargs ):
@@ -580,19 +580,19 @@ async def endpoint(*args, **kwargs):
580580 blacklist_sig = Signature (
581581 expected_params , return_annotation = Tuple [bool , str ]
582582 )
583- assert (
584- signature ( blacklist_fn ) == blacklist_sig
585- ), f"The blacklist_fn function must have the signature: blacklist( synapse: { request_name } ) -> tuple[bool, str]"
583+ assert signature ( blacklist_fn ) == blacklist_sig , (
584+ f"The blacklist_fn function must have the signature: blacklist( synapse: { request_name } ) -> tuple[bool, str]"
585+ )
586586 if priority_fn :
587587 priority_sig = Signature (expected_params , return_annotation = float )
588- assert (
589- signature ( priority_fn ) == priority_sig
590- ), f"The priority_fn function must have the signature: priority( synapse: { request_name } ) -> float"
588+ assert signature ( priority_fn ) == priority_sig , (
589+ f"The priority_fn function must have the signature: priority( synapse: { request_name } ) -> float"
590+ )
591591 if verify_fn :
592592 verify_sig = Signature (expected_params , return_annotation = None )
593- assert (
594- signature ( verify_fn ) == verify_sig
595- ), f"The verify_fn function must have the signature: verify( synapse: { request_name } ) -> None"
593+ assert signature ( verify_fn ) == verify_sig , (
594+ f"The verify_fn function must have the signature: verify( synapse: { request_name } ) -> None"
595+ )
596596
597597 # Store functions in appropriate attribute dictionaries
598598 self .forward_class_types [request_name ] = param_class
@@ -747,9 +747,9 @@ def check_config(cls, config: "Config"):
747747 Raises:
748748 AssertionError: If the axon or external ports are not in range [1024, 65535]
749749 """
750- assert (
751- 1024 < config . axon . port < 65535
752- ), "Axon port must be in range [1024, 65535]"
750+ assert 1024 < config . axon . port < 65535 , (
751+ "Axon port must be in range [1024, 65535]"
752+ )
753753
754754 assert config .axon .external_port is None or (
755755 1024 < config .axon .external_port < 65535
0 commit comments