File tree Expand file tree Collapse file tree 4 files changed +11
-12
lines changed Expand file tree Collapse file tree 4 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ def ans_shape(batches):
5757 os .path .join ("data" , y_data_name [2 ] + ".csv" ),
5858]
5959if len (src_jn_y ) != 3 :
60- raise Exception ("Something went wrong in preparing files used for join" )
60+ error_msg = "Something went wrong in preparing files used for join"
61+ raise Exception (error_msg )
6162
6263print (
6364 "loading datasets "
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ ignore = [
8383 # "PT001",
8484 # "ANN204",
8585 # "B008",
86- " EM101" ,
86+ # "EM101",
8787 " PLR0913" ,
8888 " PLR1714" ,
8989 " ANN201" ,
Original file line number Diff line number Diff line change @@ -529,18 +529,17 @@ def join(
529529
530530 if on is not None :
531531 if left_on is not None or right_on is not None :
532- raise ValueError (
533- "`left_on` or `right_on` should not provided with `on`"
534- )
532+ error_msg = "`left_on` or `right_on` should not provided with `on`"
533+ raise ValueError (error_msg )
535534 left_on = on
536535 right_on = on
537536 elif left_on is not None or right_on is not None :
538537 if left_on is None or right_on is None :
539- raise ValueError ("`left_on` and `right_on` should both be provided." )
538+ error_msg = "`left_on` and `right_on` should both be provided."
539+ raise ValueError (error_msg )
540540 else :
541- raise ValueError (
542- "either `on` or `left_on` and `right_on` should be provided."
543- )
541+ error_msg = "either `on` or `left_on` and `right_on` should be provided."
542+ raise ValueError (error_msg )
544543 if isinstance (left_on , str ):
545544 left_on = [left_on ]
546545 if isinstance (right_on , str ):
Original file line number Diff line number Diff line change @@ -454,9 +454,8 @@ def cast(
454454 try :
455455 to = self ._to_pyarrow_types [to ]
456456 except KeyError :
457- raise TypeError (
458- "Expected instance of pyarrow.DataType or builtins.type"
459- )
457+ error_msg = "Expected instance of pyarrow.DataType or builtins.type"
458+ raise TypeError (error_msg )
460459
461460 return Expr (self .expr .cast (to ))
462461
You can’t perform that action at this time.
0 commit comments