Код: Выделить всё
# mypy.ini
[mypy]
plugins = pandera.mypy
< /code>
# schema.py
from datetime import date
import pandera as pa
from pandera.typing import Index
class DateIndexModel(pa.DataFrameModel):
date: Index[date]
Код: Выделить всё
error: Type argument "date" of "Index" must be a subtype of "bool | int | str | float | ExtensionDtype | " [type-var]
Found 1 error in 1 file (checked 1 source file)
Любой обходной путь, который позволяет мне применять семантику индекса только даты (с или без DateTime.date ), сохраняя Mypy Happy? />https://colab.research.google.com/drive ... sp=sharing
Подробнее здесь: https://stackoverflow.com/questions/795 ... a-and-mypy