Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, inner):
""" Takes a reference to a Yay AST node """
self.inner = PythonicWrapper(inner)
self.inner.parent = inner.parent
self.observers = collections.defaultdict(list)
for k in dir(self):
prop = getattr(self, k)
if isinstance(prop, Property):
i = getattr(self.inner, k)
i.inner.parent = inner.parent
i.parent = inner.parent
p = prop.klass(self, i, **prop.kwargs)
setattr(self, k, p)