Skip to content

Commit

Permalink
Backwards compatibility for type alias
Browse files Browse the repository at this point in the history
  • Loading branch information
talmo committed Nov 1, 2024
1 parent 897752b commit 1a80f11
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sleap_io/model/skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from __future__ import annotations
from attrs import define, field
from typing import TypeAlias
import typing
import numpy as np


Expand Down Expand Up @@ -71,7 +71,9 @@ def __getitem__(self, idx) -> Node:
return node


NodeOrIndex: TypeAlias = Node | str | int
NodeOrIndex = Node | str | int # type: typing.TypeAlias
# NodeOrIndex: TypeAlias = Node | str | int # py >= 3.10
# type NodeOrIndex = Node | str | int # py >= 3.12


@define(eq=False)
Expand Down

0 comments on commit 1a80f11

Please sign in to comment.