Allow File.from_parent to forward custom parameters to the constructor

This commit is contained in:
Bruno Oliveira
2020-05-01 10:58:47 -03:00
parent be68496440
commit 7f5978c34c
3 changed files with 24 additions and 2 deletions

View File

@@ -483,11 +483,11 @@ class FSCollector(Collector):
self._norecursepatterns = self.config.getini("norecursedirs")
@classmethod
def from_parent(cls, parent, *, fspath):
def from_parent(cls, parent, *, fspath, **kw):
"""
The public constructor
"""
return super().from_parent(parent=parent, fspath=fspath)
return super().from_parent(parent=parent, fspath=fspath, **kw)
def _gethookproxy(self, fspath: py.path.local):
# check if we have the common case of running