@@ -476,7 +476,8 @@ def close(fignum=None):
476
476
477
477
@contextmanager
478
478
def ensure_clean (filename = None , return_filelike = False ):
479
- """Gets a temporary path and agrees to remove on close.
479
+ """
480
+ Gets a temporary path and agrees to remove on close.
480
481
481
482
Parameters
482
483
----------
@@ -566,7 +567,8 @@ def ensure_safe_environment_variables():
566
567
567
568
568
569
def equalContents (arr1 , arr2 ):
569
- """Checks if the set of unique elements of arr1 and arr2 are equivalent.
570
+ """
571
+ Checks if the set of unique elements of arr1 and arr2 are equivalent.
570
572
"""
571
573
return frozenset (arr1 ) == frozenset (arr2 )
572
574
@@ -581,7 +583,8 @@ def assert_index_equal(
581
583
check_categorical : bool = True ,
582
584
obj : str = "Index" ,
583
585
) -> None :
584
- """Check that left and right Index are equal.
586
+ """
587
+ Check that left and right Index are equal.
585
588
586
589
Parameters
587
590
----------
@@ -603,7 +606,7 @@ def assert_index_equal(
603
606
Whether to compare internal Categorical exactly.
604
607
obj : str, default 'Index'
605
608
Specify object name being compared, internally used to show appropriate
606
- assertion message
609
+ assertion message.
607
610
"""
608
611
__tracebackhide__ = True
609
612
@@ -707,7 +710,9 @@ def _get_ilevel_values(index, level):
707
710
708
711
709
712
def assert_class_equal (left , right , exact = True , obj = "Input" ):
710
- """checks classes are equal."""
713
+ """
714
+ Checks classes are equal.
715
+ """
711
716
__tracebackhide__ = True
712
717
713
718
def repr_class (x ):
@@ -734,7 +739,8 @@ def repr_class(x):
734
739
735
740
736
741
def assert_attr_equal (attr , left , right , obj = "Attributes" ):
737
- """checks attributes are equal. Both objects must have attribute.
742
+ """
743
+ Checks attributes are equal. Both objects must have attribute.
738
744
739
745
Parameters
740
746
----------
@@ -801,7 +807,9 @@ def isiterable(obj):
801
807
802
808
803
809
def assert_is_sorted (seq ):
804
- """Assert that the sequence is sorted."""
810
+ """
811
+ Assert that the sequence is sorted.
812
+ """
805
813
if isinstance (seq , (Index , Series )):
806
814
seq = seq .values
807
815
# sorting does not change precisions
@@ -811,7 +819,8 @@ def assert_is_sorted(seq):
811
819
def assert_categorical_equal (
812
820
left , right , check_dtype = True , check_category_order = True , obj = "Categorical"
813
821
):
814
- """Test that Categoricals are equivalent.
822
+ """
823
+ Test that Categoricals are equivalent.
815
824
816
825
Parameters
817
826
----------
@@ -856,7 +865,8 @@ def assert_categorical_equal(
856
865
857
866
858
867
def assert_interval_array_equal (left , right , exact = "equiv" , obj = "IntervalArray" ):
859
- """Test that two IntervalArrays are equivalent.
868
+ """
869
+ Test that two IntervalArrays are equivalent.
860
870
861
871
Parameters
862
872
----------
@@ -919,11 +929,13 @@ def raise_assert_detail(obj, message, left, right, diff=None):
919
929
elif is_categorical_dtype (right ):
920
930
right = repr (right )
921
931
922
- msg = """{obj} are different
923
-
924
- {message}
925
- [left]: {left}
926
- [right]: {right}""" .format (
932
+ msg = """
933
+ {obj} are different
934
+
935
+ {message}
936
+ [left]: {left}
937
+ [right]: {right}
938
+ """ .format (
927
939
obj = obj , message = message , left = left , right = right
928
940
)
929
941
@@ -942,7 +954,8 @@ def assert_numpy_array_equal(
942
954
check_same = None ,
943
955
obj = "numpy array" ,
944
956
):
945
- """ Checks that 'np.ndarray' is equivalent
957
+ """
958
+ Checks that 'np.ndarray' is equivalent
946
959
947
960
Parameters
948
961
----------
@@ -1019,7 +1032,8 @@ def _raise(left, right, err_msg):
1019
1032
def assert_extension_array_equal (
1020
1033
left , right , check_dtype = True , check_less_precise = False , check_exact = False
1021
1034
):
1022
- """Check that left and right ExtensionArrays are equal.
1035
+ """
1036
+ Check that left and right ExtensionArrays are equal.
1023
1037
1024
1038
Parameters
1025
1039
----------
@@ -1082,7 +1096,8 @@ def assert_series_equal(
1082
1096
check_categorical = True ,
1083
1097
obj = "Series" ,
1084
1098
):
1085
- """Check that left and right Series are equal.
1099
+ """
1100
+ Check that left and right Series are equal.
1086
1101
1087
1102
Parameters
1088
1103
----------
0 commit comments