Skip to content

Commit 68b6891

Browse files
committed
Add types.PeriodFrequency
Exactly as in pandas-dev/pandas-stubs#1394.
1 parent c9cc8d5 commit 68b6891

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

sdmx/types.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,38 @@
11
from typing import TypedDict
22

3+
from pandas.tseries.offsets import (
4+
Day,
5+
Hour,
6+
Micro,
7+
Milli,
8+
Minute,
9+
MonthEnd,
10+
Nano,
11+
QuarterEnd,
12+
Second,
13+
Week,
14+
YearEnd,
15+
)
16+
317
from sdmx.convert.pandas import Attributes
418
from sdmx.format.csv.common import CSVFormatOptions
519
from sdmx.model.common import Agency
620

21+
# See https://github.com/pandas-dev/pandas-stubs/pull/1394#issuecomment-3356958356
22+
PeriodFrequency = (
23+
Day
24+
| Hour
25+
| Minute
26+
| Second
27+
| Milli
28+
| Micro
29+
| Nano
30+
| YearEnd
31+
| QuarterEnd
32+
| MonthEnd
33+
| Week
34+
)
35+
736

837
class VersionableArtefactArgs(TypedDict, total=False):
938
version: str

0 commit comments

Comments
 (0)