@@ -678,22 +678,24 @@ def callback(message):
678678
679679 receive_parser = subparsers .add_parser ("receive" , help = receive_messages .__doc__ )
680680 receive_parser .add_argument ("subscription_name" )
681- receive_parser .add_argument ("-- timeout" , default = None , type = float )
681+ receive_parser .add_argument ("timeout" , default = None , type = float , nargs = "?" )
682682
683683 receive_with_custom_attributes_parser = subparsers .add_parser (
684684 "receive-custom-attributes" ,
685685 help = receive_messages_with_custom_attributes .__doc__ ,
686686 )
687687 receive_with_custom_attributes_parser .add_argument ("subscription_name" )
688688 receive_with_custom_attributes_parser .add_argument (
689- "-- timeout" , default = None , type = float
689+ "timeout" , default = None , type = float , nargs = "?"
690690 )
691691
692692 receive_with_flow_control_parser = subparsers .add_parser (
693693 "receive-flow-control" , help = receive_messages_with_flow_control .__doc__
694694 )
695695 receive_with_flow_control_parser .add_argument ("subscription_name" )
696- receive_with_flow_control_parser .add_argument ("--timeout" , default = None , type = float )
696+ receive_with_flow_control_parser .add_argument (
697+ "timeout" , default = None , type = float , nargs = "?"
698+ )
697699
698700 synchronous_pull_parser = subparsers .add_parser (
699701 "receive-synchronously" , help = synchronous_pull .__doc__
@@ -710,15 +712,17 @@ def callback(message):
710712 "listen-for-errors" , help = listen_for_errors .__doc__
711713 )
712714 listen_for_errors_parser .add_argument ("subscription_name" )
713- listen_for_errors_parser .add_argument ("--timeout" , default = None , type = float )
715+ listen_for_errors_parser .add_argument (
716+ "timeout" , default = None , type = float , nargs = "?"
717+ )
714718
715719 receive_messages_with_delivery_attempts_parser = subparsers .add_parser (
716720 "receive-messages-with-delivery-attempts" ,
717721 help = receive_messages_with_delivery_attempts .__doc__ ,
718722 )
719723 receive_messages_with_delivery_attempts_parser .add_argument ("subscription_name" )
720724 receive_messages_with_delivery_attempts_parser .add_argument (
721- "-- timeout" , default = None , type = float
725+ "timeout" , default = None , type = float , nargs = "?"
722726 )
723727
724728 args = parser .parse_args ()
0 commit comments