diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 951866b..2123c91 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,6 +29,5 @@ repos: hooks: - id: mypy additional_dependencies: [types-requests, types-PyYAML] - language_version: python3.8 default_language_version: python: python3 diff --git a/src/equation_tree/util/type_check.py b/src/equation_tree/util/type_check.py index 704db4a..3df5419 100644 --- a/src/equation_tree/util/type_check.py +++ b/src/equation_tree/util/type_check.py @@ -22,7 +22,7 @@ def is_numeric(s): False """ - if isinstance(s, str) and (not s[0].isnumeric() and s[0] != "."): + if isinstance(s, str) and (not s[0].isnumeric() and not (s[0] in [".", "-"])): return False try: float(s)