MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / __init__

Method __init__

_pydev_bundle/fsnotify/__init__.py:196–215  ·  view source on GitHub ↗

:param Callable[str, bool] accept_directory: Callable that returns whether a directory should be watched. Note: if passed it'll override the `ignored_dirs` :param Callable[str, bool] accept_file: Callable that returns whether a file should be wat

(self, accept_directory=None, accept_file=None)

Source from the content-addressed store, hash-verified

194 max_recursion_level = 10
195
196 def __init__(self, accept_directory=None, accept_file=None):
197 """
198 :param Callable[str, bool] accept_directory:
199 Callable that returns whether a directory should be watched.
200 Note: if passed it'll override the `ignored_dirs`
201
202 :param Callable[str, bool] accept_file:
203 Callable that returns whether a file should be watched.
204 Note: if passed it'll override the `accepted_file_extensions`.
205 """
206 self._path_watchers = set()
207 self._disposed = _pydev_saved_modules.ThreadingEvent()
208
209 if accept_directory is None:
210 accept_directory = lambda dir_path: basename(dir_path) not in self.ignored_dirs
211 if accept_file is None:
212 accept_file = lambda path_name: not self.accepted_file_extensions or path_name.endswith(self.accepted_file_extensions)
213 self.accept_file = accept_file
214 self.accept_directory = accept_directory
215 self._single_visit_info = _SingleVisitInfo()
216
217 @property
218 def accept_directory(self):

Callers

nothing calls this directly

Calls 2

basenameFunction · 0.85
_SingleVisitInfoClass · 0.85

Tested by

no test coverage detected