Enable Ruff TRY300 (#114437)

* Enable Ruff TRY300

* Update validation.py

* Address review comments
This commit is contained in:
Sid 2024-03-30 10:37:59 +01:00 committed by GitHub
parent 9a79320861
commit 6587ee20db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
97 changed files with 259 additions and 243 deletions

View file

@ -145,9 +145,9 @@ class _Right(_IntegrationMethod):
def _is_numeric_state(state: State) -> bool:
try:
float(state.state)
return True
except (ValueError, TypeError):
return False
return True
_NAME_TO_INTEGRATION_METHOD: dict[str, type[_IntegrationMethod]] = {