Skip to content

Commit

Permalink
validators created
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-lemos-da-silva committed Dec 27, 2024
1 parent b0b6676 commit 7713980
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
12 changes: 1 addition & 11 deletions src/diffpy/utils/parsers/loaddata.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,14 +333,4 @@ def _findDataBlocks(self):
return


# End of class TextDataLoader


def isfloat(s):
"""True if s is convertible to float."""
try:
float(s)
return True
except ValueError:
pass
return False
# End of class TextDataLoader
8 changes: 8 additions & 0 deletions src/diffpy/utils/parsers/validators.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def isnumber(s):
"""True if s is convertible to float."""
try:
float(s)
return True
except ValueError:
pass
return False

0 comments on commit 7713980

Please sign in to comment.