Python library and shell utilities to monitor filesystem events.
This report summarizes scanner evidence for gorakhargosh/watchdog, a Python project with 7,432 GitHub stars. SynthScan examined 18,704 lines of code across 82 source files, recording 308 pattern matches distributed across 12 syntactic categories. The legacy adjusted pattern signal is 18.0 (Elevated pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 219 finding(s).
Are imports declared and package/API names verified? 52 finding(s).
Are wrappers, guards, and repeated structures necessary? 210 finding(s).
Which changes need focused human review? 308 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 308 distinct pattern matches across 12 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_inotify_c.py | 46 | def test_late_double_deletion(helper: Helper, p: P, event_queue: TestEventQueue, start_watching: StartWatching) -> None: | CODE |
| LOW | tests/test_pattern_matching_event_handler.py | 182 | def test_rename_to_ignored_pattern(): | CODE |
| LOW | tests/test_pattern_matching_event_handler.py | 201 | def test_moved_to_ignored_hidden_path(): | CODE |
| LOW | tests/test_pattern_matching_event_handler.py | 237 | def test_rename_from_ignored_pattern() -> None: | CODE |
| LOW | tests/test_pattern_matching_event_handler.py | 258 | def test_conflicting_patterns( | CODE |
| LOW | tests/test_pattern_matching_event_handler.py | 269 | def test_rename_cross_boundary_permissive() -> None: | CODE |
| LOW | tests/test_kqueue.py | 19 | def test_register_kevent_ignores_permission_errors(tmpdir, err): | CODE |
| LOW | tests/test_logging_event_handler.py | 63 | def test_logging_event_handler_dispatch(): | CODE |
| LOW | tests/test_inotify_emitter.py | 22 | def test_missing_root_raises_and_can_be_retried(tmp_path, recursive, running): | CODE |
| LOW | tests/test_inotify_emitter.py | 68 | def test_recursive_watch_ignores_subdirectory_errors(tmp_path, monkeypatch, error, create_after_start): | CODE |
| LOW | tests/test_inotify_emitter.py | 122 | def test_filtered_events_in_subdirectory(tmp_path, recursive, create_after_start): | CODE |
| LOW | tests/test_snapshot_diff.py | 47 | def test_move_to_with_context_manager(p): | CODE |
| LOW | tests/test_snapshot_diff.py | 97 | def test_create_symlink_to_existing_file(p): | CODE |
| LOW | tests/test_snapshot_diff.py | 111 | def test_delete_symlink_to_existing_file(p): | CODE |
| LOW | tests/test_snapshot_diff.py | 125 | def test_dir_modify_on_create(p): | CODE |
| LOW | tests/test_snapshot_diff.py | 144 | def test_detect_modify_for_moved_files(p): | CODE |
| LOW | tests/test_snapshot_diff.py | 155 | def test_replace_dir_with_file(p): | CODE |
| LOW | tests/test_snapshot_diff.py | 248 | def test_move_with_changed_device(p, is_directory, modified, ignore_device): | CODE |
| LOW | tests/test_snapshot_diff.py | 274 | def test_ignore_device_preserves_hard_link_moves(p): | CODE |
| LOW | tests/test_delayed_queue.py | 35 | def test_delay_ignores_wall_clock_adjustments(monkeypatch, clock_adjustment): | CODE |
| LOW | tests/test_delayed_queue.py | 63 | def test_deprecated_delay_sec_attribute(): | CODE |
| LOW⚡ | tests/test_observer.py | 35 | def test_schedule_should_start_emitter_if_running(observer): | CODE |
| LOW⚡ | tests/test_observer.py | 42 | def test_schedule_should_not_start_emitter_if_not_running(observer): | CODE |
| LOW⚡ | tests/test_observer.py | 48 | def test_start_should_start_emitter(observer): | CODE |
| LOW⚡ | tests/test_observer.py | 55 | def test_stop_should_stop_emitter(observer): | CODE |
| LOW | tests/test_observer.py | 88 | def test_schedule_after_unschedule_all(observer): | CODE |
| LOW | tests/test_observer.py | 110 | def test_start_failure_should_not_prevent_further_try(observer): | CODE |
| LOW | tests/test_observer.py | 135 | def test_schedule_failure_should_not_prevent_future_schedules(observer): | CODE |
| LOW | tests/test_observer.py | 153 | def test_schedule_failure_does_not_keep_handler(observer, running, emitter_method): | CODE |
| LOW | tests/test_observer.py | 183 | def test_context_manager_starts_observer(): | CODE |
| LOW | tests/test_observer.py | 199 | def test_context_manager_with_already_started_observer(): | CODE |
| LOW | tests/test_observer.py | 217 | def test_context_manager_stops_on_exit(): | CODE |
| LOW | tests/test_observer.py | 233 | def test_context_manager_handles_exceptions(): | CODE |
| LOW | tests/test_observer.py | 253 | def test_context_manager_with_scheduled_watches(): | CODE |
| LOW | tests/test_fsevents.py | 78 | def test_coalesced_event_check(event, expectation): | CODE |
| LOW | tests/test_fsevents.py | 82 | def test_native_event_owns_path() -> None: | CODE |
| LOW | tests/test_fsevents.py | 99 | def test_native_event_cycles_are_collected() -> None: | CODE |
| LOW | tests/test_fsevents.py | 111 | def test_native_event_allocations_are_released() -> None: | CODE |
| LOW | tests/test_fsevents.py | 292 | def test_stopping_unstarted_observer_releases_emitter(p: P) -> None: | CODE |
| LOW | tests/test_fsevents.py | 302 | def test_stream_stop_racing_run(p: P) -> None: | CODE |
| LOW | tests/test_fsevents.py | 313 | def test_two_streams_same_path(p: P) -> None: | CODE |
| LOW | tests/test_fsevents.py | 326 | def test_two_observers_on_same_path(p: P) -> None: # for issue 919 | CODE |
| LOW | tests/test_fsevents.py | 364 | def test_stream_concurrent_run_race(p: P) -> None: | CODE |
| LOW | tests/test_fsevents.py | 405 | def test_stream_concurrent_stop_calls(p: P) -> None: | CODE |
| LOW | tests/test_fsevents.py | 425 | def test_stream_stop_from_inside_callback(p: P) -> None: | CODE |
| LOW | tests/test_fsevents.py | 449 | def test_stream_callback_failure_terminates_stream(p: P) -> None: | CODE |
| LOW | tests/test_fsevents.py | 486 | def test_observer_stop_racing_start(p: P, start_watching: StartWatching, expect_event: ExpectEvent) -> None: | CODE |
| LOW | tests/test_fsevents.py | 506 | def test_rapid_observer_start_stop(p: P) -> None: | CODE |
| LOW | tests/test_fsevents.py | 516 | def test_module_keeps_gil_disabled() -> None: | CODE |
| LOW | tests/test_fsevents.py | 637 | def test_unschedule_removed_folder(observer: BaseObserver, p: P) -> None: | CODE |
| LOW | tests/test_fsevents.py | 659 | def test_converting_cfstring_to_pyunicode(p: P, start_watching: StartWatching, events_checker: EventsChecker) -> None: | CODE |
| LOW | tests/test_fsevents.py | 675 | def test_recursive_check_accepts_relative_paths(p: P) -> None: | CODE |
| LOW | tests/test_fsevents.py | 763 | def test_fsevents_latency_configuration(p: P) -> None: | CODE |
| LOW | tests/test_fsevents.py | 780 | def test_fsevents_negative_latency_is_rejected(p: P, latency: float) -> None: | CODE |
| LOW⚡ | tests/test_fsevents.py | 131 | def test_native_event_requires_arguments() -> None: | STRING |
| LOW⚡ | tests/test_fsevents.py | 136 | def test_native_event_unsigned_id() -> None: | STRING |
| LOW⚡ | tests/test_fsevents.py | 141 | def test_stream_does_not_retain_paths_list(p: P) -> None: | STRING |
| LOW | tests/test_fsevents.py | 184 | def test_observer_propagates_stream_startup_failure(p: P, *, already_running: bool) -> None: | STRING |
| LOW | tests/test_fsevents.py | 207 | def test_stream_stop_before_run(p: P) -> None: | STRING |
| LOW | tests/test_fsevents.py | 228 | def test_stream_stop_after_start(p: P) -> None: | STRING |
| 112 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_inotify_c.py | 1 | CODE | |
| LOW | tests/conftest.py | 1 | CODE | |
| LOW | tests/test_pattern_matching_event_handler.py | 1 | CODE | |
| LOW | tests/test_kqueue.py | 1 | CODE | |
| LOW | tests/test_logging_event_handler.py | 1 | CODE | |
| LOW | tests/test_inotify_emitter.py | 1 | CODE | |
| LOW | tests/test_snapshot_diff.py | 1 | CODE | |
| LOW | tests/test_delayed_queue.py | 1 | CODE | |
| LOW | tests/test_observer.py | 1 | CODE | |
| LOW | tests/test_fsevents.py | 1 | CODE | |
| LOW | tests/shell.py | 8 | CODE | |
| LOW | tests/test_patterns.py | 1 | CODE | |
| LOW | tests/test_observers_winapi.py | 1 | CODE | |
| LOW | tests/utils.py | 1 | CODE | |
| LOW | tests/test_0_watchmedo.py | 1 | CODE | |
| LOW | tests/test_skip_repeats_queue.py | 1 | CODE | |
| LOW | tests/test_observers_polling.py | 1 | CODE | |
| LOW | tests/test_observers_api.py | 1 | CODE | |
| LOW | tests/test_events.py | 1 | CODE | |
| LOW | tests/test_event_debouncer.py | 1 | CODE | |
| LOW | tests/test_regex_matching_event_handler.py | 1 | CODE | |
| LOW | tests/test_examples.py | 1 | CODE | |
| LOW | tests/test_inotify_watch_group.py | 1 | CODE | |
| LOW | tests/test_emitter.py | 1 | CODE | |
| LOW | docs/source/examples/debounced.py | 1 | CODE | |
| LOW | docs/source/examples/simple.py | 1 | CODE | |
| LOW | docs/source/examples/file_organizer.py | 14 | CODE | |
| LOW | src/watchdog/watchmedo.py | 7 | CODE | |
| LOW | src/watchdog/version.py | 1 | CODE | |
| LOW | src/watchdog/events.py | 99 | CODE | |
| LOW | src/watchdog/utils/patterns.py | 8 | CODE | |
| LOW | src/watchdog/utils/__init__.py | 19 | CODE | |
| LOW | src/watchdog/utils/event_debouncer.py | 1 | CODE | |
| LOW | src/watchdog/utils/dirsnapshot.py | 32 | CODE | |
| LOW | src/watchdog/utils/delayed_queue.py | 6 | CODE | |
| LOW | src/watchdog/utils/platform.py | 1 | CODE | |
| LOW | src/watchdog/utils/process_watcher.py | 1 | CODE | |
| LOW | src/watchdog/utils/bricks.py | 20 | CODE | |
| LOW | src/watchdog/utils/echo.py | 26 | CODE | |
| LOW | src/watchdog/observers/fsevents.py | 8 | CODE | |
| LOW | src/watchdog/observers/inotify_move_event_grouper.py | 9 | CODE | |
| LOW | src/watchdog/observers/inotify.py | 69 | CODE | |
| LOW | src/watchdog/observers/__init__.py | 37 | CODE | |
| LOW | src/watchdog/observers/api.py | 1 | CODE | |
| LOW | src/watchdog/observers/winapi.py | 12 | CODE | |
| LOW | src/watchdog/observers/read_directory_changes.py | 1 | CODE | |
| LOW | src/watchdog/observers/kqueue.py | 58 | CODE | |
| LOW | src/watchdog/observers/inotify_c.py | 1 | CODE | |
| LOW | src/watchdog/observers/inotify_c.py | 20 | CODE | |
| LOW | src/watchdog/observers/polling.py | 22 | CODE | |
| LOW | src/watchdog/observers/fsevents2.py | 8 | CODE | |
| LOW | src/watchdog/tricks/__init__.py | 26 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_inotify_c.py | 46 | CODE | |
| LOW | tests/test_fsevents.py | 184 | CODE | |
| LOW | tests/utils.py | 189 | CODE | |
| LOW | tests/test_emitter.py | 411 | CODE | |
| LOW | tests/test_emitter.py | 454 | CODE | |
| LOW | src/watchdog/watchmedo.py | 269 | CODE | |
| LOW | src/watchdog/watchmedo.py | 463 | CODE | |
| LOW | src/watchdog/utils/backwards_compat.py | 24 | CODE | |
| LOW | src/watchdog/utils/backwards_compat.py | 96 | CODE | |
| LOW | src/watchdog/utils/event_debouncer.py | 99 | CODE | |
| LOW | src/watchdog/utils/dirsnapshot.py | 378 | CODE | |
| LOW | src/watchdog/utils/bricks.py | 80 | CODE | |
| LOW | src/watchdog/observers/fsevents.py | 189 | CODE | |
| LOW | src/watchdog/observers/inotify.py | 212 | CODE | |
| LOW | src/watchdog/observers/inotify.py | 321 | CODE | |
| LOW | src/watchdog/observers/inotify.py | 460 | CODE | |
| LOW | src/watchdog/observers/inotify.py | 523 | CODE | |
| LOW | src/watchdog/observers/__init__.py | 54 | CODE | |
| LOW | src/watchdog/observers/winapi.py | 532 | CODE | |
| LOW | src/watchdog/observers/read_directory_changes.py | 74 | CODE | |
| LOW | src/watchdog/observers/kqueue.py | 426 | CODE | |
| LOW | src/watchdog/observers/kqueue.py | 496 | CODE | |
| LOW | src/watchdog/observers/kqueue.py | 612 | CODE | |
| LOW | src/watchdog/observers/inotify_c.py | 376 | CODE | |
| LOW | src/watchdog/observers/fsevents2.py | 205 | CODE | |
| LOW | src/watchdog/tricks/__init__.py | 304 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_skip_repeats_queue.py | 144 | def produce(): | CODE |
| MEDIUM | tests/test_skip_repeats_queue.py | 223 | def produce(): | CODE |
| MEDIUM | tests/test_skip_repeats_queue.py | 269 | def produce(): | CODE |
| MEDIUM | tests/test_skip_repeats_queue.py | 362 | def produce(): | CODE |
| LOW | tests/test_skip_repeats_queue.py | 147 | except Exception as exc: | CODE |
| LOW | tests/test_skip_repeats_queue.py | 226 | except Exception as exc: | CODE |
| LOW | tests/test_skip_repeats_queue.py | 272 | except Exception as exc: | CODE |
| LOW | tests/test_skip_repeats_queue.py | 279 | except Exception as exc: | CODE |
| LOW | tests/test_skip_repeats_queue.py | 365 | except Exception as exc: | CODE |
| MEDIUM | src/watchdog/watchmedo.py | 818 | print(f"Error: {exc.args[0]}", file=sys.stderr) # noqa:T201 | CODE |
| LOW | src/watchdog/utils/process_watcher.py | 29 | except Exception: | CODE |
| LOW | src/watchdog/observers/fsevents.py | 336 | except Exception: | CODE |
| LOW⚡ | src/watchdog/observers/__init__.py | 63 | except Exception: | CODE |
| LOW⚡ | src/watchdog/observers/__init__.py | 66 | except Exception: | CODE |
| LOW⚡ | src/watchdog/observers/__init__.py | 76 | except Exception: | CODE |
| LOW | src/watchdog/observers/api.py | 320 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_inotify_c.py | 30 | logger = logging.getLogger(__name__) | CODE |
| LOW | tests/test_fsevents.py | 42 | logger = logging.getLogger(__name__) | CODE |
| LOW | tests/test_emitter.py | 35 | logger = logging.getLogger(__name__) | CODE |
| LOW | docs/source/examples/patterns.py | 9 | logger = logging.getLogger(__name__) | CODE |
| LOW | docs/source/examples/debounced.py | 12 | logger = logging.getLogger(__name__) | CODE |
| LOW | docs/source/examples/simple.py | 10 | logger = logging.getLogger(__name__) | CODE |
| LOW | docs/source/examples/file_organizer.py | 26 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/watchdog/utils/event_debouncer.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/watchdog/utils/process_watcher.py | 12 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/watchdog/observers/inotify_move_event_grouper.py | 22 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/watchdog/observers/inotify.py | 116 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/watchdog/observers/__init__.py | 92 | __all__ = ["Observer"] | CODE |
| LOW | src/watchdog/observers/inotify_c.py | 22 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/watchdog/observers/polling.py | 52 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/watchdog/observers/fsevents2.py | 68 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/watchdog/tricks/__init__.py | 46 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/watchdog/observers/inotify.py | 0 | observer thread that schedules watching directories and dispatches calls to event handlers. | STRING |
| HIGH | src/watchdog/observers/read_directory_changes.py | 0 | observer thread that schedules watching directories and dispatches calls to event handlers. | STRING |
| HIGH | src/watchdog/observers/kqueue.py | 0 | observer thread that schedules watching directories and dispatches calls to event handlers. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/source/conf.py | 1 | # watchdog documentation build configuration file, created by | COMMENT |
| LOW | docs/source/conf.py | 41 | "sphinx_copybutton", | COMMENT |
| LOW | .github/workflows/build-and-publish.yml | 1 | # Because this library provides extension modules for macOS, but not for other | COMMENT |
| LOW | src/pythoncapi_compat.h | 1 | // Header file providing new C API functions to old Python versions. | COMMENT |
| LOW | src/pythoncapi_compat.h | 21 | #include <Python.h> | COMMENT |
| LOW | src/pythoncapi_compat.h | 41 | # if (defined (__STDC_VERSION__) && __STDC_VERSION__ > 201710L) \ | COMMENT |
| LOW | src/pythoncapi_compat.h | 121 | # define Py_IsNone(x) Py_Is(x, Py_None) | COMMENT |
| LOW | src/pythoncapi_compat.h | 481 | COMMENT | |
| LOW | src/pythoncapi_compat.h | 541 | #if PY_VERSION_HEX < 0x030B00C1 && !defined(PYPY_VERSION) | COMMENT |
| LOW | src/pythoncapi_compat.h | 1221 | # define PyHASH_IMAG _PyHASH_IMAG | COMMENT |
| LOW | src/pythoncapi_compat.h | 1921 | #if PY_VERSION_HEX < 0x030C00A3 | COMMENT |
| LOW | src/pythoncapi_compat.h | 1941 | COMMENT | |
| LOW | src/watchdog/observers/inotify.py | 221 | # todo look into desired behavior for IN_MOVE_SELF events | COMMENT |
| LOW | src/watchdog/observers/kqueue.py | 441 | # and then quickly deleted before we could open | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/watchdog/watchmedo.py | 785 | except WatchdogShutdownError: | CODE |
| HIGH | src/watchdog/tricks/__init__.py | 319 | except OSError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_snapshot_diff.py | 201 | # Create a file and take a snapshot. | COMMENT |
| MEDIUM | tests/test_snapshot_diff.py | 299 | # Create a file and declare a DirectorySnapshot and a EmptyDirectorySnapshot. | COMMENT |
| MEDIUM | docs/source/conf.py | 4 | # This file is execfile()d with the current directory set to its containing dir. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/watchdog/observers/fsevents.py | 260 | # Check if we have a corresponding destination event in the watched path. | COMMENT |
| LOW | src/watchdog/observers/inotify_move_event_grouper.py | 74 | # Check if move_from is in delayqueue already | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/watchdog/tricks/__init__.py | 210 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/watchdog/utils/echo.py | 21 | def my_function(args): | STRING |