Skip to content

Commit

Permalink
fix typing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoming0625 committed Jul 8, 2024
1 parent c14ddc7 commit bc7ff21
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 7 deletions.
2 changes: 2 additions & 0 deletions dendritex/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

# -*- coding: utf-8 -*-

from __future__ import annotations

from typing import Optional, Dict, Sequence, Callable, NamedTuple, Tuple

import brainstate as bst
Expand Down
2 changes: 1 addition & 1 deletion dendritex/_base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import unittest


class TestIon(unittest.TestCase):
def test1(self):
pass

3 changes: 2 additions & 1 deletion dendritex/_integrators.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# limitations under the License.
# ==============================================================================

from __future__ import annotations

import brainstate as bst
import brainunit as bu
import jax
Expand All @@ -37,7 +39,6 @@ def tree_map(f, tree, *rest):
return jax.tree.map(f, tree, *rest, is_leaf=lambda a: isinstance(a, bu.Quantity))



def euler_step(target, t: jax.typing.ArrayLike, *args):
with bst.environ.context(t=t):
return target(*args)
Expand Down
2 changes: 2 additions & 0 deletions dendritex/channels/calcium.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"""

from __future__ import annotations

from typing import Union, Callable, Optional

import brainstate as bst
Expand Down
2 changes: 2 additions & 0 deletions dendritex/channels/hyperpolarization_activated.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
This module implements hyperpolarization-activated cation channels.
"""

from __future__ import annotations

from typing import Union, Callable, Optional

import brainstate as bst
Expand Down
2 changes: 2 additions & 0 deletions dendritex/channels/leaky.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"""

from __future__ import annotations

from typing import Union, Callable, Sequence, Optional

import brainstate as bst
Expand Down
2 changes: 2 additions & 0 deletions dendritex/channels/potassium.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"""

from __future__ import annotations

from typing import Union, Callable, Optional, Sequence

import brainstate as bst
Expand Down
2 changes: 2 additions & 0 deletions dendritex/channels/potassium_calcium.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
This module implements calcium-dependent potassium channels.
"""

from __future__ import annotations

from typing import Union, Callable, Optional

import brainstate as bst
Expand Down
2 changes: 2 additions & 0 deletions dendritex/channels/sodium.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"""

from __future__ import annotations

from typing import Union, Callable, Optional

import brainstate as bst
Expand Down
2 changes: 2 additions & 0 deletions dendritex/ions/calcium.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

# -*- coding: utf-8 -*-

from __future__ import annotations

from typing import Union, Callable, Optional

import brainstate as bst
Expand Down
4 changes: 3 additions & 1 deletion dendritex/ions/potassium.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
# ==============================================================================


from __future__ import annotations

from typing import Union, Callable, Optional

import brainunit as bu
import brainstate as bst
import brainunit as bu

from .._base import Ion, Channel, check_hierarchies

Expand Down
4 changes: 2 additions & 2 deletions dendritex/ions/sodium.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
# limitations under the License.
# ==============================================================================

from __future__ import annotations

from typing import Union, Callable, Optional

import brainstate as bst
import brainunit as bu

from .._base import Ion, Channel, check_hierarchies
from .._base import Ion

__all__ = [
'Sodium',
Expand Down Expand Up @@ -57,4 +58,3 @@ def __init__(
)
self.E = bst.init.param(E, self.varshape, allow_none=False)
self.C = bst.init.param(C, self.varshape, allow_none=False)

2 changes: 0 additions & 2 deletions dendritex/neurons/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@
from .hh import *
from .hh import __all__ as _hh_all


__all__ = _hh_all

1 change: 1 addition & 0 deletions dendritex/neurons/hh.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.
# ==============================================================================

from __future__ import annotations

from typing import Union, Optional, Callable

Expand Down

0 comments on commit bc7ff21

Please sign in to comment.