rL i~8dZddlZddlZddlmZGddZy)zDuration module.N)_apiceZdZdZddgZdZdZdZdZdZ d Z d Z e je ejZe je ej"Ze je ej&Ze je ej*Ze je ej.Ze je ej2Zd Zd Zd ZeZdZdZ dZ!y)DurationzClass Duration in development.ETUTCcbtj|j|||_||_y)a3 Create a new Duration object. = ERROR CONDITIONS - If the input frame is not in the allowed list, an error is thrown. = INPUT VARIABLES - frame The frame of the duration. Must be 'ET' or 'UTC' - seconds The number of seconds in the Duration. )frameN)r check_in_listallowed_frame_seconds)selfr secondss k/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/matplotlib/testing/jpl_units/Duration.py__init__zDuration.__init__s& 4<sP 10 c177 #:  C' T]]S\\%ABBrc|j|dt|j|j|jz S)a3 Subtract two Durations. = ERROR CONDITIONS - If the input rhs is not in the same frame, an error is thrown. = INPUT VARIABLES - rhs The Duration to subtract. = RETURN VALUE - Returns the difference of ourselves and the input Duration. sub)r rr r rr"s r__sub__zDuration.__sub__Ts2 C' T]]S\\%ABBrcZt|j|jt|zS)z Scale a UnitDbl by a value. = INPUT VARIABLES - rhs The scalar to multiply by. = RETURN VALUE - Returns the scaled Duration. )rr r floatr/s r__mul__zDuration.__mul__ds" T]]U3Z%?@@rc:|jdd|jS)Print the Duration.g )r r rs r__str__zDuration.__str__rs--"!DKK=11rc>d|jd|jddS)r5z Duration('z', r6))r r rs r__repr__zDuration.__repr__vs"DKK=DMM!+>rc|j|jk7r(td|d|jd|jy)aK Check to see if frames are the same. = ERROR CONDITIONS - If the frame of the rhs Duration is not the same as our frame, an error is thrown. = INPUT VARIABLES - rhs The Duration to check for the same frame - func The name of the function doing the check. zCannot z' Durations with different frames. LHS: z RHS: N)r ValueError)rr"funcs rr zDuration.checkSameFramezsN ;;#** $$  }% |%& & %rN)"__name__ __module__ __qualname____doc__r rr rrrrr# functools partialmethodoperatoreq__eq__ne__ne__lt__lt__le__le__gt__gt__ge__ge__r,r0r3__rmul__r8r;r rrrr s(UmG  95"/%Y $ $T8;; 7F $Y $ $T8;; 7F $Y $ $T8;; 7F $Y $ $T8;; 7F $Y $ $T8;; 7F $Y $ $T8;; 7FC,C AH2?&rr)rBrCrE matplotlibrrrSrrrUsA&A&r