@@ -21,9 +21,7 @@ def main() -> None:
2121 )
2222
2323 parent_parser = argparse .ArgumentParser (add_help = False )
24- parent_parser .add_argument (
25- "topic" , type = str , help = "Kafka topic. format is broker<:port>/topic"
26- )
24+ parent_parser .add_argument ("topic" , type = str , help = "Kafka topic. format is broker<:port>/topic" )
2725
2826 parent_parser .add_argument (
2927 "-X" ,
@@ -41,9 +39,7 @@ def main() -> None:
4139 type = argparse .FileType ("a" ),
4240 )
4341
44- sub_parsers = parser .add_subparsers (
45- help = "sub-command help" , required = True , dest = "command"
46- )
42+ sub_parsers = parser .add_subparsers (help = "sub-command help" , required = True , dest = "command" )
4743
4844 consumer_parser = argparse .ArgumentParser (add_help = False )
4945 consumer_parser .add_argument (
@@ -68,24 +64,16 @@ def main() -> None:
6864 consumer_mode_parser .add_argument (
6965 "-o" , "--offset" , help = "offset to consume from" , type = int , required = False
7066 )
71- consumer_mode_parser .add_argument (
72- "-s" , "--schema" , required = False , default = "auto" , type = str
73- )
74- consumer_mode_parser .add_argument (
75- "-g" , "--go-forwards" , required = False , action = "store_true"
76- )
77- consumer_mode_parser .add_argument (
78- "-p" , "--partition" , required = False , type = int , default = 0
79- )
67+ consumer_mode_parser .add_argument ("-s" , "--schema" , required = False , default = "auto" , type = str )
68+ consumer_mode_parser .add_argument ("-g" , "--go-forwards" , required = False , action = "store_true" )
69+ consumer_mode_parser .add_argument ("-p" , "--partition" , required = False , type = int , default = 0 )
8070
8171 listen_parser = sub_parsers .add_parser (
8272 _LISTEN ,
8373 help = "listen mode - listen until KeyboardInterrupt" ,
8474 parents = [parent_parser , consumer_parser ],
8575 )
86- listen_parser .add_argument (
87- "-p" , "--partition" , required = False , type = int , default = None
88- )
76+ listen_parser .add_argument ("-p" , "--partition" , required = False , type = int , default = None )
8977
9078 if len (sys .argv ) == 1 :
9179 parser .print_help ()
0 commit comments