"""Contain logic for checking standard error files""" import re from .errors import InvalidCellValue def valid_value(val): """Checks whether `val` is a valid value for standard errors""" if re.search(r"^[0-9]+\.[0-9]{6,}$", val): return float(val) raise InvalidCellValue( f"Invalid value '{val}'. " "Expected string representing a number with at least six decimal " "places.")