From 8f3c39d6dacb5f79e1a8e6336b8b846f0fe7d485 Mon Sep 17 00:00:00 2001 From: Erkan Ozgur Yilmaz Date: Mon, 8 Jul 2024 12:30:41 +0100 Subject: [PATCH] [#53] Removed the class variable-esque type definitions from the `Timecode` class. --- timecode/__init__.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/timecode/__init__.py b/timecode/__init__.py index 8ead589..bd4e5f2 100644 --- a/timecode/__init__.py +++ b/timecode/__init__.py @@ -66,10 +66,7 @@ class Timecode(object): force_non_drop_frame (bool): If True, uses Non-Dropframe calculation for 29.97 or 59.94 only. Has no meaning for any other framerate. It is False by default. - """ - _framerate: Union[str, int, float, Fraction] - _int_framerate: int - _frames: int + """ def __init__( self, @@ -86,11 +83,10 @@ def __init__( self.ms_frame = False self.fraction_frame = False - self._int_framerate = None # type: ignore - self._framerate = None # type: ignore + self._int_framerate : Union[None, int] = None + self._framerate : Union[None, str, int, float, Fraction] = None self.framerate = framerate # type: ignore - - self._frames = None # type: ignore + self._frames : Union[None, int] = None # attribute override order # start_timecode > frames > start_seconds