Skip to content

Commit

Permalink
satisfy ci
Browse files Browse the repository at this point in the history
  • Loading branch information
pfackeldey committed Dec 15, 2023
1 parent c8f5c7e commit 19a2dab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/dilax/custom_types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import Any, Callable
from collections.abc import Callable
from typing import Any

import jax

Expand Down
4 changes: 2 additions & 2 deletions src/dilax/optimizer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

from collections.abc import Hashable
from typing import TYPE_CHECKING, Any, Callable, cast
from collections.abc import Callable, Hashable
from typing import TYPE_CHECKING, Any, cast

import equinox as eqx
import jax
Expand Down
8 changes: 4 additions & 4 deletions src/dilax/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import collections
import pprint
from collections.abc import Hashable, Iterable, Mapping
from typing import TYPE_CHECKING, Any, Callable, TypeVar, cast
from collections.abc import Callable, Hashable, Iterable, Mapping
from typing import TYPE_CHECKING, Any, TypeVar, cast

import jax
import jax.numpy as jnp
Expand Down Expand Up @@ -146,7 +146,7 @@ def foo(hists):

@staticmethod
def keyify(keyish: Any) -> frozenset:
if not isinstance(keyish, (tuple, list, set, frozenset)):
if not isinstance(keyish, tuple | list | set | frozenset):
keyish = (keyish,)
_check_no_duplicate_keys(keyish)
keyish = frozenset(keyish)
Expand Down Expand Up @@ -225,7 +225,7 @@ def _flatten(tree):

def _make_unflatten(cls: type[FrozenDB]) -> Callable:
def _unflatten(keys, values):
return cls(dict(zip(keys, values)), __unsafe_skip_copy__=True)
return cls(dict(zip(keys, values, strict=True)), __unsafe_skip_copy__=True)

return _unflatten

Expand Down

0 comments on commit 19a2dab

Please sign in to comment.