Skip to content

Commit

Permalink
linting fixes, bugfix to zanj pre override
Browse files Browse the repository at this point in the history
  • Loading branch information
mivanit committed Jun 27, 2024
1 parent 731dc1e commit fbfa3fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions zanj/externals.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
)


def load_jsonl(zanj: "LoadedZANJ", fp: IO[bytes]) -> list[JSONitem]: # type: ignore[name-defined]
def load_jsonl(zanj: "LoadedZANJ", fp: IO[bytes]) -> list[JSONitem]: # type: ignore[name-defined] # noqa: F821
return [json.loads(line) for line in fp]


def load_npy(zanj: "LoadedZANJ", fp: IO[bytes]) -> np.ndarray: # type: ignore[name-defined]
def load_npy(zanj: "LoadedZANJ", fp: IO[bytes]) -> np.ndarray: # type: ignore[name-defined] # noqa: F821
return np.load(fp)


Expand Down
7 changes: 4 additions & 3 deletions zanj/zanj.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
from muutils.json_serialize.util import JSONitem, MonoTuple
from muutils.sysinfo import SysInfo

from zanj.externals import ZANJ_MAIN, ZANJ_META, ExternalItem, _ZANJ_pre
from zanj.externals import ZANJ_MAIN, ZANJ_META, ExternalItem
import zanj.externals
from zanj.loading import LOADER_MAP, LoadedZANJ, load_item_recursive
from zanj.serializing import (
DEFAULT_SERIALIZER_HANDLERS_ZANJ,
Expand All @@ -45,7 +46,7 @@
ZANJitem = Union[
JSONitem,
np.ndarray,
"pd.DataFrame", # type: ignore
"pd.DataFrame", # type: ignore # noqa: F821
]


Expand Down Expand Up @@ -246,4 +247,4 @@ def read(
)


_ZANJ_pre = ZANJ # type: ignore
zanj.externals._ZANJ_pre = ZANJ # type: ignore

0 comments on commit fbfa3fe

Please sign in to comment.