File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ func Test_AAA_python3_setup()
2828 py37_exception_repr = re .compile (r ' ([^\(\),])(\)+)$' )
2929 py39_type_error_pattern = re .compile (r ' \w+\.([^(]+\(\) takes)' )
3030 py310_type_error_pattern = re .compile (r ' takes (\d+) positional argument but (\d+) were given' )
31+ py314_type_error_tuple_pattern = re .compile (r ' must be (\d+)-item tuple' )
3132
3233 def emsg (ei ):
3334 return ei [0 ].__name__ + ' :' + repr (ei [1 ].args )
@@ -64,6 +65,8 @@ func Test_AAA_python3_setup()
6465 # Python 3.9 reports errors like " vim.command() takes ..." instead of " command() takes ..."
6566 msg = py39_type_error_pattern.sub (r ' \1' , msg)
6667 msg = py310_type_error_pattern.sub (r ' takes exactly \1 positional argument (\2 given)' , msg)
68+ # Python 3.14 has specific error messages for Tuple's
69+ msg = py314_type_error_tuple_pattern.sub (r ' must be \1-item sequence' , msg)
6770 elif sys.version_info >= (3 , 5 ) and e .__class__ is ValueError and str (e ) == ' embedded null byte' :
6871 msg = repr ((TypeError, TypeError (' expected bytes with no null' )))
6972 else :
You can’t perform that action at this time.
0 commit comments