-
Notifications
You must be signed in to change notification settings - Fork 282
Closed
Labels
topic: featureDiscussions about new features for Python's type annotationsDiscussions about new features for Python's type annotations
Description
"""
This module defines convenience types for type hinting purposes.
It extends the types provided by pymatgen with Abipy-specific ones.
"""
from __future__ import annotations
import numpy as np
from pymatgen.util.typing import *
if TYPE_CHECKING: # needed to avoid circular imports
from matplotlib.pyplot import Axes
from matplotlib.figure import Figure
from abipy.core.kpoints import Kpoint
else:
Axes = Any
Figure = Any
Kpoint = Any
VectorLike = Union[Sequence[float], np.ndarray]
# matplotlib objects
#AxList = list[Axes]
# Abipy objects
KptLike = Union["Kpoint", VectorLike]
KptSelect = Union[int, "Kpoint", "VectorLike"]Please help!
Metadata
Metadata
Assignees
Labels
topic: featureDiscussions about new features for Python's type annotationsDiscussions about new features for Python's type annotations