Skip to content

Commit

Permalink
delete a useless "if" statement
Browse files Browse the repository at this point in the history
Co-authored-by: Gui-FernandesBR <[email protected]>
  • Loading branch information
kalounis and Gui-FernandesBR authored Dec 19, 2023
1 parent c76dccb commit c729bc6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions rocketpy/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,10 @@ def is_float(element):
result : boolean
The element is convertible or not.
"""
if element is None:
return False
try:
float(element)
return True
except ValueError:
except (ValueError, TypeError):
return False


Expand Down

0 comments on commit c729bc6

Please sign in to comment.