Fix 6341 disallow session config in fromparent (#6387)

Fix 6341 disallow session config in fromparent
This commit is contained in:
Bruno Oliveira
2020-01-29 19:21:02 -03:00
committed by GitHub
6 changed files with 49 additions and 9 deletions

View File

@@ -687,7 +687,10 @@ class Class(PyCollector):
@classmethod
def from_parent(cls, parent, *, name, obj=None):
return cls._create(name=name, parent=parent)
"""
The public constructor
"""
return super().from_parent(name=name, parent=parent)
def collect(self):
if not safe_getattr(self.obj, "__test__", True):
@@ -1475,8 +1478,11 @@ class Function(FunctionMixin, nodes.Item):
self.originalname = originalname
@classmethod
def from_parent(cls, parent, **kw):
return cls._create(parent=parent, **kw)
def from_parent(cls, parent, **kw): # todo: determine sound type limitations
"""
The public constructor
"""
return super().from_parent(parent=parent, **kw)
def _initrequest(self):
self.funcargs = {}