Skip to content

Commit 3162024

Browse files
committed
Remove redundant decorators on individual @overloads
1 parent bc2efa2 commit 3162024

File tree

1 file changed

+0
-69
lines changed
  • hypothesis-python/src/hypothesis/extra

1 file changed

+0
-69
lines changed

hypothesis-python/src/hypothesis/extra/numpy.py

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,6 @@ def fill_for(elements, unique, fill, name=""):
419419

420420

421421
@overload
422-
@defines_strategy(force_reusable_values=True)
423422
def arrays(
424423
dtype: Union["np.dtype[G]", st.SearchStrategy["np.dtype[G]"]],
425424
shape: Union[int, st.SearchStrategy[int], Shape, st.SearchStrategy[Shape]],
@@ -428,10 +427,7 @@ def arrays(
428427
fill: Optional[st.SearchStrategy[Any]] = None,
429428
unique: bool = False,
430429
) -> "st.SearchStrategy[NDArray[G]]": ...
431-
432-
433430
@overload
434-
@defines_strategy(force_reusable_values=True)
435431
def arrays(
436432
dtype: Union[D, st.SearchStrategy[D]],
437433
shape: Union[int, st.SearchStrategy[int], Shape, st.SearchStrategy[Shape]],
@@ -440,8 +436,6 @@ def arrays(
440436
fill: Optional[st.SearchStrategy[Any]] = None,
441437
unique: bool = False,
442438
) -> "st.SearchStrategy[NDArray[Any]]": ...
443-
444-
445439
@defines_strategy(force_reusable_values=True)
446440
def arrays(
447441
dtype: Union[D, st.SearchStrategy[D]],
@@ -625,50 +619,35 @@ def dtype_factory(kind, sizes, valid_sizes, endianness):
625619

626620

627621
@overload
628-
@defines_dtype_strategy
629622
def unsigned_integer_dtypes(
630623
*,
631624
endianness: str = "?",
632625
sizes: Literal[8],
633626
) -> st.SearchStrategy["np.dtype[np.uint8]"]: ...
634-
635-
636627
@overload
637-
@defines_dtype_strategy
638628
def unsigned_integer_dtypes(
639629
*,
640630
endianness: str = "?",
641631
sizes: Literal[16],
642632
) -> st.SearchStrategy["np.dtype[np.uint16]"]: ...
643-
644-
645633
@overload
646-
@defines_dtype_strategy
647634
def unsigned_integer_dtypes(
648635
*,
649636
endianness: str = "?",
650637
sizes: Literal[32],
651638
) -> st.SearchStrategy["np.dtype[np.uint32]"]: ...
652-
653-
654639
@overload
655-
@defines_dtype_strategy
656640
def unsigned_integer_dtypes(
657641
*,
658642
endianness: str = "?",
659643
sizes: Literal[64],
660644
) -> st.SearchStrategy["np.dtype[np.uint64]"]: ...
661-
662-
663645
@overload
664-
@defines_dtype_strategy
665646
def unsigned_integer_dtypes(
666647
*,
667648
endianness: str = "?",
668649
sizes: Sequence[Literal[8, 16, 32, 64]] = (8, 16, 32, 64),
669650
) -> st.SearchStrategy["np.dtype[np.unsignedinteger[Any]]"]: ...
670-
671-
672651
@defines_dtype_strategy
673652
def unsigned_integer_dtypes(
674653
*,
@@ -693,50 +672,35 @@ def unsigned_integer_dtypes(
693672

694673

695674
@overload
696-
@defines_dtype_strategy
697675
def integer_dtypes(
698676
*,
699677
endianness: str = "?",
700678
sizes: Literal[8],
701679
) -> st.SearchStrategy["np.dtype[np.int8]"]: ...
702-
703-
704680
@overload
705-
@defines_dtype_strategy
706681
def integer_dtypes(
707682
*,
708683
endianness: str = "?",
709684
sizes: Literal[16],
710685
) -> st.SearchStrategy["np.dtype[np.int16]"]: ...
711-
712-
713686
@overload
714-
@defines_dtype_strategy
715687
def integer_dtypes(
716688
*,
717689
endianness: str = "?",
718690
sizes: Literal[32],
719691
) -> st.SearchStrategy["np.dtype[np.int32]"]: ...
720-
721-
722692
@overload
723-
@defines_dtype_strategy
724693
def integer_dtypes(
725694
*,
726695
endianness: str = "?",
727696
sizes: Literal[64],
728697
) -> st.SearchStrategy["np.dtype[np.int64]"]: ...
729-
730-
731698
@overload
732-
@defines_dtype_strategy
733699
def integer_dtypes(
734700
*,
735701
endianness: str = "?",
736702
sizes: Sequence[Literal[8, 16, 32, 64]] = (8, 16, 32, 64),
737703
) -> st.SearchStrategy["np.dtype[np.signedinteger[Any]]"]: ...
738-
739-
740704
@defines_dtype_strategy
741705
def integer_dtypes(
742706
*,
@@ -757,50 +721,35 @@ def integer_dtypes(
757721

758722

759723
@overload
760-
@defines_dtype_strategy
761724
def floating_dtypes(
762725
*,
763726
endianness: str = "?",
764727
sizes: Literal[16],
765728
) -> st.SearchStrategy["np.dtype[np.float16]"]: ...
766-
767-
768729
@overload
769-
@defines_dtype_strategy
770730
def floating_dtypes(
771731
*,
772732
endianness: str = "?",
773733
sizes: Literal[32],
774734
) -> st.SearchStrategy["np.dtype[np.float32]"]: ...
775-
776-
777735
@overload
778-
@defines_dtype_strategy
779736
def floating_dtypes(
780737
*,
781738
endianness: str = "?",
782739
sizes: Literal[64],
783740
) -> st.SearchStrategy["np.dtype[np.float64]"]: ...
784-
785-
786741
@overload
787-
@defines_dtype_strategy
788742
def floating_dtypes(
789743
*,
790744
endianness: str = "?",
791745
sizes: Literal[128],
792746
) -> st.SearchStrategy["np.dtype[np.float128]"]: ...
793-
794-
795747
@overload
796-
@defines_dtype_strategy
797748
def floating_dtypes(
798749
*,
799750
endianness: str = "?",
800751
sizes: Sequence[Literal[16, 32, 64, 96, 128]] = (16, 32, 64),
801752
) -> st.SearchStrategy["np.dtype[np.floating[Any]]"]: ...
802-
803-
804753
@defines_dtype_strategy
805754
def floating_dtypes(
806755
*,
@@ -822,41 +771,29 @@ def floating_dtypes(
822771

823772

824773
@overload
825-
@defines_dtype_strategy
826774
def complex_number_dtypes(
827775
*,
828776
endianness: str = "?",
829777
sizes: Literal[64],
830778
) -> st.SearchStrategy["np.dtype[np.complex64]"]: ...
831-
832-
833779
@overload
834-
@defines_dtype_strategy
835780
def complex_number_dtypes(
836781
*,
837782
endianness: str = "?",
838783
sizes: Literal[128],
839784
) -> st.SearchStrategy["np.dtype[np.complex128]"]: ...
840-
841-
842785
@overload
843-
@defines_dtype_strategy
844786
def complex_number_dtypes(
845787
*,
846788
endianness: str = "?",
847789
sizes: Literal[256],
848790
) -> st.SearchStrategy["np.dtype[np.complex256]"]: ...
849-
850-
851791
@overload
852-
@defines_dtype_strategy
853792
def complex_number_dtypes(
854793
*,
855794
endianness: str = "?",
856795
sizes: Sequence[Literal[64, 128, 192, 256]] = (64, 128),
857796
) -> st.SearchStrategy["np.dtype[np.complexfloating[Any, Any]]"]: ...
858-
859-
860797
@defines_dtype_strategy
861798
def complex_number_dtypes(
862799
*,
@@ -1175,24 +1112,18 @@ def basic_indices(
11751112

11761113

11771114
@overload
1178-
@defines_strategy()
11791115
def integer_array_indices(
11801116
shape: Shape,
11811117
*,
11821118
result_shape: st.SearchStrategy[Shape] = array_shapes(),
11831119
) -> "st.SearchStrategy[tuple[NDArray[np.signedinteger[Any]], ...]]": ...
1184-
1185-
11861120
@overload
1187-
@defines_strategy()
11881121
def integer_array_indices(
11891122
shape: Shape,
11901123
*,
11911124
result_shape: st.SearchStrategy[Shape] = array_shapes(),
11921125
dtype: "np.dtype[I]",
11931126
) -> "st.SearchStrategy[tuple[NDArray[I], ...]]": ...
1194-
1195-
11961127
@defines_strategy()
11971128
def integer_array_indices(
11981129
shape: Shape,

0 commit comments

Comments
 (0)