@@ -146,13 +146,11 @@ def instance(
146
146
147
147
@overload
148
148
@classmethod
149
- def now (cls , tz : datetime .tzinfo | None = None ) -> Self :
150
- ...
149
+ def now (cls , tz : datetime .tzinfo | None = None ) -> Self : ...
151
150
152
151
@overload
153
152
@classmethod
154
- def now (cls , tz : str | Timezone | FixedTimezone | None = None ) -> Self :
155
- ...
153
+ def now (cls , tz : str | Timezone | FixedTimezone | None = None ) -> Self : ...
156
154
157
155
@classmethod
158
156
def now (
@@ -474,7 +472,7 @@ def __repr__(self) -> str:
474
472
if self .microsecond :
475
473
us = f", { self .microsecond } "
476
474
477
- repr_ = "{klass}(" " {year}, {month}, {day}, " " {hour}, {minute}, {second}{us}"
475
+ repr_ = "{klass}({year}, {month}, {day}, {hour}, {minute}, {second}{us}"
478
476
479
477
if self .tzinfo is not None :
480
478
repr_ += ", tzinfo={tzinfo}"
@@ -1008,7 +1006,7 @@ def nth_of(self, unit: str, nth: int, day_of_week: WeekDay) -> Self:
1008
1006
if unit not in ["month" , "quarter" , "year" ]:
1009
1007
raise ValueError (f'Invalid unit "{ unit } " for first_of()' )
1010
1008
1011
- dt = cast (Optional [" Self" ] , getattr (self , f"_nth_of_{ unit } " )(nth , day_of_week ))
1009
+ dt = cast (" Optional[Self]" , getattr (self , f"_nth_of_{ unit } " )(nth , day_of_week ))
1012
1010
if not dt :
1013
1011
raise PendulumException (
1014
1012
f"Unable to find occurrence { nth } "
@@ -1186,12 +1184,10 @@ def average( # type: ignore[override]
1186
1184
)
1187
1185
1188
1186
@overload # type: ignore[override]
1189
- def __sub__ (self , other : datetime .timedelta ) -> Self :
1190
- ...
1187
+ def __sub__ (self , other : datetime .timedelta ) -> Self : ...
1191
1188
1192
1189
@overload
1193
- def __sub__ (self , other : DateTime ) -> Interval [datetime .datetime ]:
1194
- ...
1190
+ def __sub__ (self , other : DateTime ) -> Interval [datetime .datetime ]: ...
1195
1191
1196
1192
def __sub__ (
1197
1193
self , other : datetime .datetime | datetime .timedelta
0 commit comments