Skip to content

Commit de0f98b

Browse files
committed
pre-commit fixes
1 parent 659f181 commit de0f98b

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

docs/conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15-
from typing import Dict
1615
import sys
1716
import os
1817
from unittest.mock import Mock as MagicMock
@@ -231,7 +230,7 @@ def __getattr__(cls, name):
231230

232231
# -- Options for LaTeX output ---------------------------------------------
233232

234-
latex_elements: Dict[str, str] = {
233+
latex_elements: dict[str, str] = {
235234
# The paper size ('letterpaper' or 'a4paper').
236235
#'papersize': 'letterpaper',
237236
# The font size ('10pt', '11pt' or '12pt').

notebooks/benchmark_vlen.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@
5555
" enc = codec.encode(a)\n",
5656
" print('decode')\n",
5757
" %timeit codec.decode(enc)\n",
58-
" print('size : {:,}'.format(len(enc)))\n",
59-
" print('size (zstd 1): {:,}'.format(len(zstd1.encode(enc))))\n",
60-
" print('size (zstd 5): {:,}'.format(len(zstd5.encode(enc))))\n",
61-
" print('size (zstd 9): {:,}'.format(len(zstd9.encode(enc))))"
58+
" print(f'size : {len(enc):,}')\n",
59+
" print(f'size (zstd 1): {len(zstd1.encode(enc)):,}')\n",
60+
" print(f'size (zstd 5): {len(zstd5.encode(enc)):,}')\n",
61+
" print(f'size (zstd 9): {len(zstd9.encode(enc)):,}')"
6262
]
6363
},
6464
{

numcodecs/checksum32.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from typing import Optional, Callable, TYPE_CHECKING
1+
from typing import Optional, TYPE_CHECKING
2+
from collections.abc import Callable
23
import zlib
34

45
import numpy as np

numcodecs/registry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33

44
from importlib.metadata import entry_points
55
import logging
6-
from typing import Dict, TYPE_CHECKING
6+
from typing import TYPE_CHECKING
77

88
from numcodecs.abc import Codec
99

1010
if TYPE_CHECKING:
1111
from importlib.metadata import EntryPoints
1212

1313
logger = logging.getLogger("numcodecs")
14-
codec_registry: Dict[str, Codec] = {}
15-
entries: Dict[str, "EntryPoints"] = {}
14+
codec_registry: dict[str, Codec] = {}
15+
entries: dict[str, "EntryPoints"] = {}
1616

1717

1818
def run_entrypoints():

0 commit comments

Comments
 (0)