Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save hackaugusto/2266871f69dac442e0bd210365c38d7a to your computer and use it in GitHub Desktop.

Select an option

Save hackaugusto/2266871f69dac442e0bd210365c38d7a to your computer and use it in GitHub Desktop.
from dataclasses import dataclass, field
@dataclass
class A1:
a: int
@dataclass
class A2:
a: A1 = field(repr=False)
class B:
b: int
def __init__(self, b):
self.b = b
def func():
# pylint: disable=E1101
f = A2(A1(1)).a.a
s = B(1).a
return (f, s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment