Skip to content

Commit 4725cea

Browse files
authored
Merge branch 'develop' into deimplement-comparison
2 parents 9515f9e + 6629be4 commit 4725cea

3 files changed

Lines changed: 732 additions & 134 deletions

File tree

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
__pycache__
12
.coverage
23
.DS_Store
34
.pytest_cache/*
45
.ruff_cache/*
56
.venv/*
7+
.vscode/*
68
*.egg-info
79
*.egg-info/*
810
*.pyc
@@ -14,5 +16,4 @@ docs/doctrees/*
1416
docs/html/*
1517
docs/latex/*
1618
docs/source/generated/*
17-
include/*
18-
__pycache__
19+
include/*

src/timecode/timecode.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Standard Library Imports
44
from __future__ import annotations
55

6+
import math
67
import sys
78
from contextlib import suppress
89
from typing import TYPE_CHECKING, overload
@@ -880,14 +881,16 @@ def frame_number(self) -> int:
880881
"""
881882
return self.frames - 1
882883

884+
883885
@property
884886
def float(self) -> float:
885887
"""Return the seconds as float.
886888
887889
Returns:
888890
float: The seconds as float.
889891
"""
890-
return float(self.frames) / float(self._int_framerate)
892+
time_value = float(self.frames) / float(self._int_framerate)
893+
return math.nextafter(time_value, math.inf)
891894

892895

893896
class TimecodeError(Exception):

0 commit comments

Comments
 (0)