Skip to content

Commit

Permalink
Added verification
Browse files Browse the repository at this point in the history
  • Loading branch information
HubertPalo committed Feb 6, 2025
1 parent 19d7f61 commit 07915b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jsonargparse/_loaders_dumpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def load_basic(value):
return None
if value.isdigit() or (value.startswith("-") and value[1:].isdigit()):
return int(value)
if value.replace(".", "", 1).replace("e", "", 1).replace("-", "", 2).isdigit() and ("e" in value or "." in value):
if not value.startswith('e') and not value.endswith('e') and value.replace(".", "", 1).replace("e", "", 1).replace("-", "", 2).isdigit() and ("e" in value or "." in value):
return float(value)
return not_loaded

Expand Down

0 comments on commit 07915b4

Please sign in to comment.