@@ -32,6 +32,8 @@ cnp.import_array()
32
32
33
33
# TODO: formalize having _libs.properties "above" tslibs in the dependency structure
34
34
35
+ from typing import ClassVar
36
+
35
37
from pandas._libs.properties import cache_readonly
36
38
37
39
from pandas._libs.tslibs cimport util
@@ -2524,8 +2526,7 @@ cdef class YearOffset(SingleConstructorOffset):
2524
2526
"""
2525
2527
_attributes = tuple ([" n" , " normalize" , " month" ])
2526
2528
2527
- # FIXME(cython#4446): python annotation here gives compile-time errors
2528
- # _default_month: int
2529
+ _default_month: ClassVar[int ]
2529
2530
2530
2531
cdef readonly:
2531
2532
int month
@@ -2788,9 +2789,8 @@ cdef class QuarterOffset(SingleConstructorOffset):
2788
2789
# point. Also apply_index, is_on_offset, rule_code if
2789
2790
# startingMonth vs month attr names are resolved
2790
2791
2791
- # FIXME(cython#4446): python annotation here gives compile-time errors
2792
- # _default_starting_month: int
2793
- # _from_name_starting_month: int
2792
+ _default_starting_month: ClassVar[int ]
2793
+ _from_name_starting_month: ClassVar[int ]
2794
2794
2795
2795
cdef readonly:
2796
2796
int startingMonth
@@ -3018,9 +3018,8 @@ cdef class HalfYearOffset(SingleConstructorOffset):
3018
3018
_attributes = tuple ([" n" , " normalize" , " startingMonth" ])
3019
3019
# TODO: Consider combining HalfYearOffset, QuarterOffset and YearOffset
3020
3020
3021
- # FIXME(cython#4446): python annotation here gives compile-time errors
3022
- # _default_starting_month: int
3023
- # _from_name_starting_month: int
3021
+ _default_starting_month: ClassVar[int ]
3022
+ _from_name_starting_month: ClassVar[int ]
3024
3023
3025
3024
cdef readonly:
3026
3025
int startingMonth
0 commit comments