@@ -37,7 +37,7 @@ def _divide_and_round(a: float, b: float) -> int:
3737 # positive, 2 * r < b if b negative.
3838 r *= 2
3939 greater_than_half = r > b if b > 0 else r < b
40- if greater_than_half or r == b and q % 2 == 1 :
40+ if greater_than_half or ( r == b and q % 2 == 1 ) :
4141 q += 1
4242
4343 return q
@@ -375,12 +375,10 @@ def __mul__(self, other: int | float) -> Self:
375375 __rmul__ = __mul__
376376
377377 @overload
378- def __floordiv__ (self , other : timedelta ) -> int :
379- ...
378+ def __floordiv__ (self , other : timedelta ) -> int : ...
380379
381380 @overload
382- def __floordiv__ (self , other : int ) -> Self :
383- ...
381+ def __floordiv__ (self , other : int ) -> Self : ...
384382
385383 def __floordiv__ (self , other : int | timedelta ) -> int | Duration :
386384 if not isinstance (other , (int , timedelta )):
@@ -389,7 +387,8 @@ def __floordiv__(self, other: int | timedelta) -> int | Duration:
389387 usec = self ._to_microseconds ()
390388 if isinstance (other , timedelta ):
391389 return cast (
392- int , usec // other ._to_microseconds () # type: ignore[attr-defined]
390+ int ,
391+ usec // other ._to_microseconds (), # type: ignore[attr-defined]
393392 )
394393
395394 if isinstance (other , int ):
@@ -402,12 +401,10 @@ def __floordiv__(self, other: int | timedelta) -> int | Duration:
402401 )
403402
404403 @overload
405- def __truediv__ (self , other : timedelta ) -> float :
406- ...
404+ def __truediv__ (self , other : timedelta ) -> float : ...
407405
408406 @overload
409- def __truediv__ (self , other : float ) -> Self :
410- ...
407+ def __truediv__ (self , other : float ) -> Self : ...
411408
412409 def __truediv__ (self , other : int | float | timedelta ) -> Self | float :
413410 if not isinstance (other , (int , float , timedelta )):
@@ -416,7 +413,8 @@ def __truediv__(self, other: int | float | timedelta) -> Self | float:
416413 usec = self ._to_microseconds ()
417414 if isinstance (other , timedelta ):
418415 return cast (
419- float , usec / other ._to_microseconds () # type: ignore[attr-defined]
416+ float ,
417+ usec / other ._to_microseconds (), # type: ignore[attr-defined]
420418 )
421419
422420 if isinstance (other , int ):
@@ -443,7 +441,7 @@ def __truediv__(self, other: int | float | timedelta) -> Self | float:
443441
444442 def __mod__ (self , other : timedelta ) -> Self :
445443 if isinstance (other , timedelta ):
446- r = self ._to_microseconds () % other ._to_microseconds () # type: ignore[attr-defined] # noqa: E501
444+ r = self ._to_microseconds () % other ._to_microseconds () # type: ignore[attr-defined]
447445
448446 return self .__class__ (0 , 0 , r )
449447
0 commit comments