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,8 @@ 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
+ completer = ChoicesCompleter (()),
702
+ )
690
703
authentication .add_argument (
691
704
'--ignore-netrc' ,
692
705
default = False ,
@@ -720,7 +733,8 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
720
733
and $HTTPS_proxy are supported as well.
721
734
722
735
""" ,
723
- ).completer = ChoicesCompleter (())
736
+ completer = ChoicesCompleter (()),
737
+ )
724
738
network .add_argument (
725
739
'--follow' ,
726
740
'-F' ,
@@ -738,16 +752,18 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
738
752
By default, requests have a limit of 30 redirects (works with --follow).
739
753
740
754
""" ,
741
- ).completer = ChoicesCompleter (())
755
+ completer = ChoicesCompleter (()),
756
+ )
742
757
network .add_argument (
743
758
'--max-headers' ,
744
759
type = int ,
745
760
default = 0 ,
746
761
short_help = (
747
762
'The maximum number of response headers to be read before '
748
763
'giving up (default 0, i.e., no limit).'
749
- )
750
- ).completer = ChoicesCompleter (())
764
+ ),
765
+ completer = ChoicesCompleter (()),
766
+ )
751
767
752
768
network .add_argument (
753
769
'--timeout' ,
@@ -764,7 +780,8 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
764
780
the underlying socket for timeout seconds).
765
781
766
782
""" ,
767
- ).completer = ChoicesCompleter (())
783
+ completer = ChoicesCompleter (()),
784
+ )
768
785
network .add_argument (
769
786
'--check-status' ,
770
787
default = False ,
@@ -814,7 +831,8 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
814
831
for private certs. (Or you can set the REQUESTS_CA_BUNDLE environment
815
832
variable instead.)
816
833
""" ,
817
- ).completer = ChoicesCompleter (('yes' , 'no' ))
834
+ completer = ChoicesCompleter (('yes' , 'no' )),
835
+ )
818
836
ssl .add_argument (
819
837
'--ssl' ,
820
838
dest = 'ssl_version' ,
@@ -828,7 +846,8 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
828
846
are shown here).
829
847
830
848
""" ,
831
- ).completer = ChoicesCompleter (())
849
+ completer = ChoicesCompleter (()),
850
+ )
832
851
ssl .add_argument (
833
852
'--ciphers' ,
834
853
short_help = 'A string in the OpenSSL cipher list format.' ,
@@ -840,7 +859,8 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
840
859
{ DEFAULT_SSL_CIPHERS }
841
860
842
861
""" ,
843
- ).completer = ChoicesCompleter (())
862
+ completer = ChoicesCompleter (()),
863
+ )
844
864
ssl .add_argument (
845
865
'--cert' ,
846
866
default = None ,
@@ -852,7 +872,8 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
852
872
specify --cert-key separately.
853
873
854
874
""" ,
855
- ).completer = FilesCompleter (('crt' , 'cert' , 'pem' ))
875
+ completer = FilesCompleter (('crt' , 'cert' , 'pem' )),
876
+ )
856
877
ssl .add_argument (
857
878
'--cert-key' ,
858
879
default = None ,
@@ -863,7 +884,8 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
863
884
certificate file does not contain the private key.
864
885
865
886
""" ,
866
- ).completer = FilesCompleter (('key' , 'pem' ))
887
+ completer = FilesCompleter (('key' , 'pem' )),
888
+ )
867
889
868
890
ssl .add_argument (
869
891
'--cert-key-pass' ,
@@ -874,8 +896,9 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
874
896
The passphrase to be used to with the given private key. Only needed if --cert-key
875
897
is given and the key file requires a passphrase.
876
898
If not provided, you’ll be prompted interactively.
877
- """
878
- ).completer = ChoicesCompleter (())
899
+ """ ,
900
+ completer = ChoicesCompleter (()),
901
+ )
879
902
880
903
#######################################################################
881
904
# Troubleshooting
@@ -916,8 +939,9 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
916
939
troubleshooting .add_argument (
917
940
'--default-scheme' ,
918
941
default = 'http' ,
919
- short_help = 'The default scheme to use if not specified in the URL.'
920
- ).completer = ChoicesCompleter (('http' , 'https' ))
942
+ short_help = 'The default scheme to use if not specified in the URL.' ,
943
+ completer = ChoicesCompleter (('http' , 'https' )),
944
+ )
921
945
troubleshooting .add_argument (
922
946
'--debug' ,
923
947
action = 'store_true' ,
0 commit comments