TYP/DOC: date_range (and other *_range) functions support timedelta as freq parameter
I'm coming from a question in pandas-dev/pandas-stubs#223 asking about where mypy complains about me using a timedelta as a "freq" argument to function pandas.date_range:
Argument "freq" to "date_range" has incompatible type "timedelta"; expected "Union[str, BaseOffset]"
Since #6307 this is officially supported in at least for date_range, but very probably for most other range functions.
From what I learned over in pandas-stubs, this repo's code (or rather docstrings) should explicitly document the new type support so that pandas-stubs may infer that for their stubs.
@ojdo I'm coming from that issue as well. Perhaps worth a PR to update the docs here?
https://github.com/pandas-dev/pandas/blob/a712c5019dc0cfb58652ddcdf06361244f38ad9f/pandas/core/indexes/datetimes.py#L969-L972
https://github.com/pandas-dev/pandas/blob/a712c5019dc0cfb58652ddcdf06361244f38ad9f/pandas/core/indexes/datetimes.py#L1166-L1167
This issue can be closed, PR was merged.