Skip to content

Commit

Permalink
pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dstansby committed Aug 24, 2024
1 parent 659f181 commit de0f98b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
3 changes: 1 addition & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

from typing import Dict
import sys
import os
from unittest.mock import Mock as MagicMock
Expand Down Expand Up @@ -231,7 +230,7 @@ def __getattr__(cls, name):

# -- Options for LaTeX output ---------------------------------------------

latex_elements: Dict[str, str] = {
latex_elements: dict[str, str] = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
Expand Down
8 changes: 4 additions & 4 deletions notebooks/benchmark_vlen.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
" enc = codec.encode(a)\n",
" print('decode')\n",
" %timeit codec.decode(enc)\n",
" print('size : {:,}'.format(len(enc)))\n",
" print('size (zstd 1): {:,}'.format(len(zstd1.encode(enc))))\n",
" print('size (zstd 5): {:,}'.format(len(zstd5.encode(enc))))\n",
" print('size (zstd 9): {:,}'.format(len(zstd9.encode(enc))))"
" print(f'size : {len(enc):,}')\n",
" print(f'size (zstd 1): {len(zstd1.encode(enc)):,}')\n",
" print(f'size (zstd 5): {len(zstd5.encode(enc)):,}')\n",
" print(f'size (zstd 9): {len(zstd9.encode(enc)):,}')"
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion numcodecs/checksum32.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import Optional, Callable, TYPE_CHECKING
from typing import Optional, TYPE_CHECKING
from collections.abc import Callable
import zlib

import numpy as np
Expand Down
6 changes: 3 additions & 3 deletions numcodecs/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

from importlib.metadata import entry_points
import logging
from typing import Dict, TYPE_CHECKING
from typing import TYPE_CHECKING

from numcodecs.abc import Codec

if TYPE_CHECKING:
from importlib.metadata import EntryPoints

Check warning on line 11 in numcodecs/registry.py

View check run for this annotation

Codecov / codecov/patch

numcodecs/registry.py#L11

Added line #L11 was not covered by tests

logger = logging.getLogger("numcodecs")
codec_registry: Dict[str, Codec] = {}
entries: Dict[str, "EntryPoints"] = {}
codec_registry: dict[str, Codec] = {}
entries: dict[str, "EntryPoints"] = {}


def run_entrypoints():
Expand Down

0 comments on commit de0f98b

Please sign in to comment.