@@ -678,22 +678,24 @@ def callback(message):
678
678
679
679
receive_parser = subparsers .add_parser ("receive" , help = receive_messages .__doc__ )
680
680
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 = "?" )
682
682
683
683
receive_with_custom_attributes_parser = subparsers .add_parser (
684
684
"receive-custom-attributes" ,
685
685
help = receive_messages_with_custom_attributes .__doc__ ,
686
686
)
687
687
receive_with_custom_attributes_parser .add_argument ("subscription_name" )
688
688
receive_with_custom_attributes_parser .add_argument (
689
- "-- timeout" , default = None , type = float
689
+ "timeout" , default = None , type = float , nargs = "?"
690
690
)
691
691
692
692
receive_with_flow_control_parser = subparsers .add_parser (
693
693
"receive-flow-control" , help = receive_messages_with_flow_control .__doc__
694
694
)
695
695
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
+ )
697
699
698
700
synchronous_pull_parser = subparsers .add_parser (
699
701
"receive-synchronously" , help = synchronous_pull .__doc__
@@ -710,15 +712,17 @@ def callback(message):
710
712
"listen-for-errors" , help = listen_for_errors .__doc__
711
713
)
712
714
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
+ )
714
718
715
719
receive_messages_with_delivery_attempts_parser = subparsers .add_parser (
716
720
"receive-messages-with-delivery-attempts" ,
717
721
help = receive_messages_with_delivery_attempts .__doc__ ,
718
722
)
719
723
receive_messages_with_delivery_attempts_parser .add_argument ("subscription_name" )
720
724
receive_messages_with_delivery_attempts_parser .add_argument (
721
- "-- timeout" , default = None , type = float
725
+ "timeout" , default = None , type = float , nargs = "?"
722
726
)
723
727
724
728
args = parser .parse_args ()
0 commit comments