There's currently 4 pages in the docs which mention BaseOffset: - https://pandas.pydata.org/docs/reference/api/pandas.Period.asfreq.html - https://pandas.pydata.org/docs/reference/api/pandas.Period.now.html - https://pandas.pydata.org/docs/reference/api/pandas.tseries.frequencies.to_offset.html

However, BaseOffset isn't user-facing

Should they just be replaced with DateOffset?

This is also relevant for pandas-stubs which uses BaseOffset in a few places

@jbrockmendel is this ok to do?

Based on

https://github.com/pandas-dev/pandas/blob/0c4ca3a9e4baa9b4fa8cbc81c57f2e2996636c10/pandas/_libs/tslibs/offsets.pyx#L1620-L1632

they should be interchangeable?

Comment From: jbrockmendel

Do type checkers understand the isinstance override behavior? Using BaseOffset strikes me as less likely to cause misunderstandings.

Isn't there a namespace like pd.typing for things that aren't supposed to be used directly by users but can be used for annotation purposes? Seems like BaseOffset would be a good fit there.

Comment From: MarcoGorelli

sure, for type checking that's fine

but for public-facing docs, BaseOffset isn't documented, shouldn't DateOffset be used there?