@@ -46,7 +46,7 @@ class PackagedevConvertCommand(WindowAndTextCommand):
4646 )
4747
4848 def run (self , edit = None , source_format = None , target_format = None , ext = None ,
49- open_new_file = False , rearrange_yaml_syntax_def = False , _output = None , * args , * *kwargs ):
49+ open_new_file = False , rearrange_yaml_syntax_def = False , _output = None , ** kwargs ):
5050 """Available parameters:
5151
5252 edit (sublime.Edit) = None
@@ -83,10 +83,6 @@ def run(self, edit=None, source_format=None, target_format=None, ext=None,
8383 _output (OutputPanel) = None
8484 For internal use only.
8585
86- *args
87- Forwarded to pretty much every relevant call but does not have any effect.
88- You can't pass *args in commands anyway.
89-
9086 **kwargs
9187 Will be forwarded to both the loading function and the dumping function, after
9288 stripping unsupported entries. Only do this if you know what you're doing.
@@ -99,7 +95,6 @@ def run(self, edit=None, source_format=None, target_format=None, ext=None,
9995 A more detailed description of each supported parameter for the respective dumper can
10096 be found in `fileconv/dumpers.py`.
10197 """
102- # TODO: Ditch *args, can't be passed in commands anyway
10398
10499 # Check the environment (view, args, ...)
105100
@@ -190,7 +185,7 @@ def on_select(index):
190185
191186 kwargs .update (target ['kwargs' ])
192187 kwargs .update (dict (source_format = source_format , _output = output ))
193- self .run (* args , * *kwargs )
188+ self .run (** kwargs )
194189
195190 # Forward all params to the new command call
196191 self .window .show_quick_panel (options , on_select )
@@ -215,8 +210,8 @@ def on_select(index):
215210 # in order to receive a nice traceback in the console
216211 loader_ = Loader (self .window , self .view , output = output )
217212 try :
218- data = loader_ .load (* args , * *kwargs )
219- except :
213+ data = loader_ .load (** kwargs )
214+ except Exception :
220215 output .write_line ("Unexpected error occurred while parsing, "
221216 "please see the console for details." )
222217 raise
@@ -237,8 +232,8 @@ def on_select(index):
237232 dumper = dumpers .get [target_format ](self .window , self .view , new_file_path ,
238233 output = output )
239234 try :
240- dumper .dump (data , * args , * *kwargs )
241- except :
235+ dumper .dump (data , ** kwargs )
236+ except Exception :
242237 output .write_line ("Unexpected error occurred while dumping, "
243238 "please see the console for details." )
244239 raise
0 commit comments