Skip to content

Commit

Permalink
TypeGuard[float] added to isfloat
Browse files Browse the repository at this point in the history
  • Loading branch information
NormannK authored and drbacke committed Oct 8, 2024
1 parent bddf89b commit bda6d24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/akkudoktoreosserver/flask_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import os
from datetime import datetime
from typing import Any
from typing import Any, TypeGuard

import matplotlib

Expand All @@ -27,7 +27,7 @@
)


def isfloat(num: Any) -> bool:
def isfloat(num: Any) -> TypeGuard[float]:
"""Check if a given input can be converted to float."""
if num is None:
return False
Expand Down

0 comments on commit bda6d24

Please sign in to comment.