blob: ae1e378ba51b79cb1dc410bbb288f4df8f5e3b62 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
"""Contain logic for checking standard error files"""
import re
from .errors import InvalidValue
def valid_value(val):
if re.search("^[0-9]+\.[0-9]{6,}$", val):
return float(val)
raise InvalidValue(
f"Invalid value '{val}'.\n"
"Expected string representing a number with at least six decimal "
"places.")
|