You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import dataclasses as dtc
import asyncio
PublishedMessagesVar = dict[int, 'PublishedMessages']
@dtc.dataclass(frozen=True, slots=True)
class PublishedMessages:
task: asyncio.Future[int]
left: int
right: int
then
$ mypy t2.py
t2.py:7: error: "PublishedMessages" both defines "__slots__" and is used with "slots=True"
Found 1 error in 1 file (checked 1 source file)
Above with Mypy 0.930, Python 3.10.1
There is no problem
when line with PublishedMessagesVar is removed
with Mypy 0.921
The text was updated successfully, but these errors were encountered:
wrobell
changed the title
False error for dataclass slots when class is references earlier
False error for dataclass slots when class is referenced earlier
Dec 23, 2021
Please consider
then
Above with Mypy 0.930, Python 3.10.1
There is no problem
PublishedMessagesVar
is removedThe text was updated successfully, but these errors were encountered: