From d785aa39f99720950cd7f9acfe1133494cb5ff58 Mon Sep 17 00:00:00 2001 From: Elisha Hollander Date: Wed, 7 Jul 2021 13:41:08 +0300 Subject: MAINT: Remove unused imports and unreachable code (#18762) * Remove unnecessary imports and minor fixes --- numpy/lib/format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib/format.py') diff --git a/numpy/lib/format.py b/numpy/lib/format.py index 9b8f90dbd..6ac66c22a 100644 --- a/numpy/lib/format.py +++ b/numpy/lib/format.py @@ -606,7 +606,7 @@ def _read_array_header(fp, version): if EXPECTED_KEYS != d.keys(): keys = sorted(d.keys()) msg = "Header does not contain the correct keys: {!r}" - raise ValueError(msg.format(d.keys())) + raise ValueError(msg.format(keys)) # Sanity-check the values. if (not isinstance(d['shape'], tuple) or -- cgit v1.2.1