Skip to content

Code Quality Report

Generated: 2026-04-05 03:55 UTC


Lines of Code

Files Code Comment Blank Total
Source 9 553 201 136 890
Tests 19 1 313 198 367 1 878
Combined 28 1 866 399 503 2 768
  • Comment/code ratio: 36%
  • Test/source ratio: 237.4%
Source by module (click to expand)
Module Files Code Comment Blank
__init__.py 41 14 9
_cli.py 40 13 17
_constants.py 9 11 11
_interfaces.py 57 19 11
_notifier.py 81 42 16
_null.py 22 11 8
_protocol.py 26 36 8
_registry.py 77 20 20
_subscriber.py 200 35 36

Architecture

Module Dependency Graph

graph TD
    terok_dbus --> terok_dbus._interfaces
    terok_dbus --> terok_dbus._notifier
    terok_dbus --> terok_dbus._null
    terok_dbus --> terok_dbus._protocol
    terok_dbus --> terok_dbus._subscriber
    terok_dbus._notifier --> terok_dbus._constants
    terok_dbus._subscriber --> terok_dbus._interfaces
    terok_dbus._cli --> terok_dbus._registry
    terok_dbus._constants
    terok_dbus._protocol
    terok_dbus._interfaces
    terok_dbus._null
    terok_dbus._registry

Module Boundaries

9 modules, 8 dependency edges — all boundaries validated.

Module Summary

9 modules (click to expand)
Module Deps Description
terok_dbus 5 Package root — public API (re-exports from internal modules)
terok_dbus._constants 0 D-Bus constants and close-reason codes
terok_dbus._protocol 0 Notifier protocol definition
terok_dbus._interfaces 0 Shield1 / Clearance1 interface definitions
terok_dbus._null 0 NullNotifier (headless fallback)
terok_dbus._notifier 1 DbusNotifier (dbus-fast implementation)
terok_dbus._subscriber 1 Event subscriber (Shield1 + Clearance1 signal bridge)
terok_dbus._registry 0 Command registry (consumed by CLI and terok integration layer)
terok_dbus._cli 1 CLI entry point

Test Coverage

Coverage is collected from unit tests in CI and uploaded to Codecov.

Coverage Treemap

Each rectangle represents a source file. Size is proportional to the number of lines; colour shows the coverage percentage (green = high, red = low).

Cognitive Complexity

Threshold: 15 (functions above this are listed below)

  • Functions analyzed: 37
  • Median complexity: 0 · Average: 1.6 · Max: 13
  • Within threshold (15): 100% (37/37)
    0–  3 │ ██████████████████████████████  32 (86.5%)
    4–  6 │ ████                             4 (10.8%)
    7–  9 │                                  0 ( 0.0%)
   10– 12 │                                  0 ( 0.0%)
   13– 15 │ █                                1 ( 2.7%) ◄ threshold

All functions are within the cognitive complexity threshold of 15.

Dead Code Analysis

No dead code found at 80% confidence threshold.

Docstring Coverage

  • Needed: 53 - Found: 53 - Missing: 0
  • Total coverage: 100.0% - Grade: AMAZING! Your docstrings are truly a wonder to behold!

Generated by scc, complexipy, vulture, tach, and docstr-coverage.