diff --git a/lib/galaxy/model/custom_types.py b/lib/galaxy/model/custom_types.py index f36b4b9a6130..762c203eade4 100644 --- a/lib/galaxy/model/custom_types.py +++ b/lib/galaxy/model/custom_types.py @@ -32,7 +32,7 @@ class SafeJsonEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, numpy.int_): return int(obj) - elif isinstance(obj, numpy.float_): + elif isinstance(obj, numpy.float64): return float(obj) elif isinstance(obj, bytes): return unicodify(obj) diff --git a/pyproject.toml b/pyproject.toml index 92f64e3672d8..214fb82bbeb3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -199,7 +199,7 @@ exclude = [ # Enable: pycodestyle errors (E), Pyflakes (F), flake8-bugbear (B), # flake8-comprehensions (C4), flake8-logging-format (G), # flake8-implicit-str-concat (ISC) and pyupgrade (UP) -select = ["E", "F", "B", "C4", "G", "ISC", "UP"] +select = ["E", "F", "B", "C4", "G", "ISC", "NPY", "UP"] # Exceptions: # B008 Do not perform function calls in argument defaults (for FastAPI Depends and Body) # B9 flake8-bugbear opinionated warnings