Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
__pycache__
.coverage
.DS_Store
.pytest_cache/*
.ruff_cache/*
.venv/*
.vscode/*
*.egg-info
*.egg-info/*
*.pyc
Expand All @@ -14,5 +16,4 @@ docs/doctrees/*
docs/html/*
docs/latex/*
docs/source/generated/*
include/*
__pycache__
include/*
5 changes: 4 additions & 1 deletion src/timecode/timecode.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Standard Library Imports
from __future__ import annotations

import math
import sys
from contextlib import suppress
from typing import TYPE_CHECKING, overload
Expand Down Expand Up @@ -885,14 +886,16 @@ def frame_number(self) -> int:
"""
return self.frames - 1


@property
def float(self) -> float:
"""Return the seconds as float.

Returns:
float: The seconds as float.
"""
return float(self.frames) / float(self._int_framerate)
time_value = float(self.frames) / float(self._int_framerate)
return math.nextafter(time_value, math.inf)


class TimecodeError(Exception):
Expand Down
Loading