aboutsummaryrefslogtreecommitdiff
path: root/convert.py
diff options
context:
space:
mode:
authorPavol Rusnak <pavol@rusnak.io>2023-04-14 14:23:21 +0200
committerGitHub <noreply@github.com>2023-04-14 14:23:21 +0200
commit43ffdefb7424f79a3d510c199e2ea86684b4f824 (patch)
tree0b798a278714e146bc931fc2375990da88d4fd0b /convert.py
parent1623a6e9b46453bff30afd7d0f6c3fd188499c2f (diff)
py : fix flake8 and isort nitpicks (#960)
Diffstat (limited to 'convert.py')
-rw-r--r--convert.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/convert.py b/convert.py
index f35163f..056dc61 100644
--- a/convert.py
+++ b/convert.py
@@ -18,10 +18,12 @@ import zipfile
from abc import ABCMeta, abstractmethod
from dataclasses import dataclass
from pathlib import Path
+from typing import (IO, TYPE_CHECKING, Any, Callable, Dict, Iterable, List,
+ Literal, Optional, Sequence, Tuple, TypeVar, Union)
+
import numpy as np
from sentencepiece import SentencePieceProcessor # type: ignore
-from typing import (IO, Any, Callable, Iterable, Literal, Optional, Sequence,
- TypeVar, Union, List, Dict, Tuple, TYPE_CHECKING)
+
if TYPE_CHECKING:
from typing_extensions import TypeAlias
@@ -684,7 +686,7 @@ class LazyUnpickler(pickle.Unpickler):
description = f'storage data_type={data_type} path-in-zip={filename} path={self.zip_file.filename}'
return LazyStorage(load=load, kind=pid[1], description=description)
- def lazy_rebuild_tensor_v2(storage: Any, storage_offset: Any, size: Any, stride: Any, # pyright: ignore[reportSelfClsParameterName]
+ def lazy_rebuild_tensor_v2(storage: Any, storage_offset: Any, size: Any, stride: Any, # pyright: ignore[reportSelfClsParameterName]
requires_grad: Any, backward_hooks: Any, metadata: Any = None) -> LazyTensor:
assert isinstance(storage, LazyStorage)