MCPcopy
hub / github.com/pytest-dev/pytest / __init__

Method __init__

src/_pytest/_py/path.py:139–151  ·  view source on GitHub ↗
(self, fil, rec, ignore, bf, sort)

Source from the content-addressed store, hash-verified

137
138class Visitor:
139 def __init__(self, fil, rec, ignore, bf, sort):
140 if isinstance(fil, (str, bytes)):
141 fil = FNMatcher(fil)
142 if isinstance(rec, str):
143 self.rec: Callable[[LocalPath], bool] = FNMatcher(rec)
144 elif not hasattr(rec, "__call__") and rec:
145 self.rec = lambda path: True
146 else:
147 self.rec = rec
148 self.fil = fil
149 self.ignore = ignore
150 self.breadthfirst = bf
151 self.optsort = cast(Callable[[Any], Any], sorted) if sort else (lambda x: x)
152
153 def gen(self, path):
154 try:

Callers

nothing calls this directly

Calls 1

FNMatcherClass · 0.85

Tested by

no test coverage detected