Author conchylicultor
Recipients conchylicultor
Date 2021-04-06.11:45:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1617709528.18.0.325343236001.issue43746@roundup.psfhosted.org>
In-reply-to
Content
Interestingly mypy, pylint correctly resolve the closure.

```
class A:
    dataclasses: dataclasses.Field = dataclasses.field()

A.dataclasses.other  # mypy error: "Field[Any]" has no attribute "other"
```

So the current workaround is to use quotes:

```
class A:
  # Type correctly inferred and no closure runtime error
  losses: 'losses.Losses' = losses.Losses()
```
History
Date User Action Args
2021-04-06 11:45:28conchylicultorsetrecipients: + conchylicultor
2021-04-06 11:45:28conchylicultorsetmessageid: <1617709528.18.0.325343236001.issue43746@roundup.psfhosted.org>
2021-04-06 11:45:28conchylicultorlinkissue43746 messages
2021-04-06 11:45:28conchylicultorcreate