66
66
$ http example.org hello=world # => POST
67
67
68
68
""" ,
69
- ). completer = ChoicesCompleter (
70
- ( 'GET' , 'HEAD' , 'POST' , 'PUT' , 'PATCH' , 'DELETE' , 'OPTIONS' ) )
69
+ completer = ChoicesCompleter (( 'GET' , 'HEAD' , 'POST' , 'PUT' , 'PATCH' , 'DELETE' , 'OPTIONS' ))
70
+ )
71
71
positional_arguments .add_argument (
72
72
dest = 'url' ,
73
73
metavar = 'URL' ,
82
82
$ http :/foo # => http://localhost/foo
83
83
84
84
""" ,
85
- ).completer = ChoicesCompleter (())
85
+ completer = ChoicesCompleter (()),
86
+ )
86
87
positional_arguments .add_argument (
87
88
dest = 'request_items' ,
88
89
metavar = 'REQUEST_ITEM' ,
139
140
field-name-with\:colon=value
140
141
141
142
""" ,
142
- ).completer = ChoicesCompleter (())
143
+ completer = ChoicesCompleter (()),
144
+ )
143
145
144
146
#######################################################################
145
147
# Content type.
192
194
short_help = (
193
195
'Specify a custom boundary string for multipart/form-data requests. '
194
196
'Only has effect only together with --form.'
195
- )
196
- ).completer = ChoicesCompleter (())
197
+ ),
198
+ completer = ChoicesCompleter (()),
199
+ )
197
200
content_types .add_argument (
198
201
'--raw' ,
199
202
short_help = 'Pass raw request data without extra processing.' ,
@@ -354,7 +357,8 @@ def format_style_help(available_styles, *, isolation_mode: bool = False):
354
357
--response-charset=big5
355
358
356
359
""" ,
357
- ).completer = ChoicesCompleter (())
360
+ completer = ChoicesCompleter (()),
361
+ )
358
362
output_processing .add_argument (
359
363
'--response-mime' ,
360
364
metavar = 'MIME_TYPE' ,
@@ -367,7 +371,8 @@ def format_style_help(available_styles, *, isolation_mode: bool = False):
367
371
--response-mime=text/xml
368
372
369
373
""" ,
370
- ).completer = ChoicesCompleter (())
374
+ completer = ChoicesCompleter (()),
375
+ )
371
376
output_processing .add_argument (
372
377
'--format-options' ,
373
378
action = 'append' ,
@@ -392,7 +397,8 @@ def format_style_help(available_styles, *, isolation_mode: bool = False):
392
397
f' { option } ' for option in DEFAULT_FORMAT_OPTIONS
393
398
).strip ()
394
399
),
395
- ).completer = ChoicesCompleter (())
400
+ completer = ChoicesCompleter (()),
401
+ )
396
402
397
403
#######################################################################
398
404
# Output options
@@ -421,7 +427,8 @@ def format_style_help(available_styles, *, isolation_mode: bool = False):
421
427
response body is printed by default.
422
428
423
429
""" ,
424
- ).completer = ChoicesCompleter (())
430
+ completer = ChoicesCompleter (()),
431
+ )
425
432
output_options .add_argument (
426
433
'--headers' ,
427
434
'-h' ,
@@ -495,7 +502,8 @@ def format_style_help(available_styles, *, isolation_mode: bool = False):
495
502
dest = 'output_options_history' ,
496
503
metavar = 'WHAT' ,
497
504
help = Qualifiers .SUPPRESS ,
498
- ).completer = ChoicesCompleter (())
505
+ completer = ChoicesCompleter (()),
506
+ )
499
507
output_options .add_argument (
500
508
'--stream' ,
501
509
'-S' ,
@@ -529,7 +537,8 @@ def format_style_help(available_styles, *, isolation_mode: bool = False):
529
537
printed to stderr.
530
538
531
539
""" ,
532
- ).completer = FilesCompleter ()
540
+ completer = FilesCompleter (),
541
+ )
533
542
534
543
output_options .add_argument (
535
544
'--download' ,
@@ -600,7 +609,8 @@ def format_style_help(available_styles, *, isolation_mode: bool = False):
600
609
601
610
https://httpie.io/docs/cli/config-file-directory
602
611
""" ,
603
- ).completer = FilesCompleter (('json' ,))
612
+ completer = FilesCompleter (('json' ,)),
613
+ )
604
614
sessions .add_argument (
605
615
'--session-read-only' ,
606
616
metavar = 'SESSION_NAME_OR_PATH' ,
@@ -611,7 +621,8 @@ def format_style_help(available_styles, *, isolation_mode: bool = False):
611
621
exchange.
612
622
613
623
""" ,
614
- ).completer = FilesCompleter (('json' ,))
624
+ completer = FilesCompleter (('json' ,)),
625
+ )
615
626
616
627
#######################################################################
617
628
# Authentication
@@ -675,7 +686,8 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
675
686
(-a username), HTTPie will prompt for the password.
676
687
677
688
""" ,
678
- ).completer = ChoicesCompleter (())
689
+ completer = ChoicesCompleter (()),
690
+ )
679
691
authentication .add_argument (
680
692
'--auth-type' ,
681
693
'-A' ,
@@ -686,7 +698,7 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
686
698
cache = False ,
687
699
short_help = 'The authentication mechanism to be used.' ,
688
700
help_formatter = format_auth_help ,
689
- ). completer = ChoicesCompleter (())
701
+ )
690
702
authentication .add_argument (
691
703
'--ignore-netrc' ,
692
704
default = False ,
@@ -720,7 +732,8 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
720
732
and $HTTPS_proxy are supported as well.
721
733
722
734
""" ,
723
- ).completer = ChoicesCompleter (())
735
+ completer = ChoicesCompleter (()),
736
+ )
724
737
network .add_argument (
725
738
'--follow' ,
726
739
'-F' ,
@@ -738,16 +751,18 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
738
751
By default, requests have a limit of 30 redirects (works with --follow).
739
752
740
753
""" ,
741
- ).completer = ChoicesCompleter (())
754
+ completer = ChoicesCompleter (()),
755
+ )
742
756
network .add_argument (
743
757
'--max-headers' ,
744
758
type = int ,
745
759
default = 0 ,
746
760
short_help = (
747
761
'The maximum number of response headers to be read before '
748
762
'giving up (default 0, i.e., no limit).'
749
- )
750
- ).completer = ChoicesCompleter (())
763
+ ),
764
+ completer = ChoicesCompleter (()),
765
+ )
751
766
752
767
network .add_argument (
753
768
'--timeout' ,
@@ -764,7 +779,8 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
764
779
the underlying socket for timeout seconds).
765
780
766
781
""" ,
767
- ).completer = ChoicesCompleter (())
782
+ completer = ChoicesCompleter (()),
783
+ )
768
784
network .add_argument (
769
785
'--check-status' ,
770
786
default = False ,
@@ -814,7 +830,8 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
814
830
for private certs. (Or you can set the REQUESTS_CA_BUNDLE environment
815
831
variable instead.)
816
832
""" ,
817
- ).completer = ChoicesCompleter (('yes' , 'no' ))
833
+ completer = ChoicesCompleter (('yes' , 'no' )),
834
+ )
818
835
ssl .add_argument (
819
836
'--ssl' ,
820
837
dest = 'ssl_version' ,
@@ -828,7 +845,8 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
828
845
are shown here).
829
846
830
847
""" ,
831
- ).completer = ChoicesCompleter (())
848
+ completer = ChoicesCompleter (()),
849
+ )
832
850
ssl .add_argument (
833
851
'--ciphers' ,
834
852
short_help = 'A string in the OpenSSL cipher list format.' ,
@@ -840,7 +858,8 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
840
858
{ DEFAULT_SSL_CIPHERS }
841
859
842
860
""" ,
843
- ).completer = ChoicesCompleter (())
861
+ completer = ChoicesCompleter (()),
862
+ )
844
863
ssl .add_argument (
845
864
'--cert' ,
846
865
default = None ,
@@ -852,7 +871,8 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
852
871
specify --cert-key separately.
853
872
854
873
""" ,
855
- ).completer = FilesCompleter (('crt' , 'cert' , 'pem' ))
874
+ completer = FilesCompleter (('crt' , 'cert' , 'pem' )),
875
+ )
856
876
ssl .add_argument (
857
877
'--cert-key' ,
858
878
default = None ,
@@ -863,7 +883,8 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
863
883
certificate file does not contain the private key.
864
884
865
885
""" ,
866
- ).completer = FilesCompleter (('key' , 'pem' ))
886
+ completer = FilesCompleter (('key' , 'pem' )),
887
+ )
867
888
868
889
ssl .add_argument (
869
890
'--cert-key-pass' ,
@@ -874,8 +895,9 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
874
895
The passphrase to be used to with the given private key. Only needed if --cert-key
875
896
is given and the key file requires a passphrase.
876
897
If not provided, you’ll be prompted interactively.
877
- """
878
- ).completer = ChoicesCompleter (())
898
+ """ ,
899
+ completer = ChoicesCompleter (()),
900
+ )
879
901
880
902
#######################################################################
881
903
# Troubleshooting
@@ -916,8 +938,9 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
916
938
troubleshooting .add_argument (
917
939
'--default-scheme' ,
918
940
default = 'http' ,
919
- short_help = 'The default scheme to use if not specified in the URL.'
920
- ).completer = ChoicesCompleter (('http' , 'https' ))
941
+ short_help = 'The default scheme to use if not specified in the URL.' ,
942
+ completer = ChoicesCompleter (('http' , 'https' )),
943
+ )
921
944
troubleshooting .add_argument (
922
945
'--debug' ,
923
946
action = 'store_true' ,
0 commit comments