Oleg Baskakov <baska...@google.com> added the comment:

Sorry, I forgot to add if __name__ line:
```
import codegen
from dataclasses import dataclass

@dataclass
class AtomX:
    my_symbol: str
    quantity: str = ""


if __name__ == "__main__":
    codegen.inheritance_map(AtomX("qwerty"))

```

So the output:
```
Traceback (most recent call last):
  File "/Users/baskakov/PycharmProjects/main.py", line 11, in <module>
    codegen.inheritance_map(AtomX("qwerty"))
  File "/Users/baskakov/PycharmProjects/codegen.py", line 5, in inheritance_map
    assert isinstance(candidate, AtomX)
AssertionError

```

----------
Added file: https://bugs.python.org/file50221/main.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44922>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to