diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index d12c2e7c4ae3b..45bd7429a2a19 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -2758,11 +2758,6 @@ def _generate_range( # variable has type "Optional[Timestamp]") start = offset.rollforward(start) # type: ignore[assignment] - elif end and not offset.is_on_offset(end): - # Incompatible types in assignment (expression has type "datetime", - # variable has type "Optional[Timestamp]") - end = offset.rollback(end) # type: ignore[assignment] - # Unsupported operand types for < ("Timestamp" and "None") if periods is None and end < start and offset.n >= 0: # type: ignore[operator] end = None