Public report — raspi-cam-srv, published 4 Aug 2026.
Concrete security findings (CVE IDs, secret matches, dependency versions) are hidden in this version;
ask the repo owner for the full report.
528findings with an exact file:lineof 534 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
32/94dimensions across the health lenses34852 LoC — wide & deep
Executive summary
Read through the Production lens — the standard calibration. *Green* means good enough to run in production. The score is absolute and comparable across repos.
signag/raspi-cam-srv carries serious gaps (36%). Several issues below can materially affect correctness, security, or the cost of changing it — and propagate to everything that depends on it.
It is strongest in Architecture (100%) — the structure is clean and changes stay contained.
The area that most needs attention is Readiness (18%) — releases are harder to depend on — versioning, release notes and dependency hygiene are thin, so consumers can't easily tell what changed or trust an upgrade. Accessibility (43%) is the next concern — it raises ongoing delivery and operational cost.
Leadership focus, highest impact first: CI workflow that builds and runs the test suite on every push/PR (CI/CD gates); Run what this repository's stack ships (Security & performance tooling); 1 No automated tests finding(s) in Code Coverage (Code Coverage).
For scale: Medium (~34,852 production lines); rebuilding it from scratch would take roughly ~0.2 person-years (~1 engineer). Approximate, ±~30%.
It builds on a genuinely strong Architecture foundation (100%); the priorities above are the highest-leverage way to bring the rest up to that level.
How the score is built — each lens's share of the headlineWidth is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
AC3 · Data table has no header cells raspiCamSrv/templates/home/liveDirectPanel.html
AC3 · Data table has no header cells raspiCamSrv/templates/home/liveDirectPanel.html
AC3 · Data table has no header cells raspiCamSrv/templates/images/main.html
AC3 · Data table has no header cells raspiCamSrv/templates/images/main.html
AC3 · Data table has no header cells raspiCamSrv/templates/info/info.html
AC3 · Data table has no header cells raspiCamSrv/templates/info/info.html
AC3 · Data table has no header cells raspiCamSrv/templates/info/info.html
AC3 · Page without a main landmark raspiCamSrv/templates/media_viewer.html
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
0.7× (at 36% quality) — the last 20% of quality is most of the work
Size & shape
Medium · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
This codebase represents roughly ~0.2 person-years of build effort (about ~€30,000 to rebuild). Its weakest lens is Readiness at 18% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.7× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Resolve the 1 No automated tests finding(s) in Code Coverage.
Value concentrated against a weak lens · High · Value at risk
This is a Medium asset (~0.2 person-years to rebuild), and its weakest lens is Readiness at 18%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Readiness first — highest risk-reduction per euro on an asset this size.
A velocity tax on every change · High · Economics
The code-quality signals (complexity, duplication, cohesion) average 3.4/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 12–26% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4 code quality: averaging 3.4/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.
The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 1–3 engineer-days once. Not doing it costs about 0.4–2.6 engineer-days every year, paid as drag on the ~1,492 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 5–84 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 12–26% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 368 line(s) changed over a 90-day window ⇒ ~1,492/year · D1/D2/D4 code quality: averaging 3.4/10 ⇒ a 12–26% drag on each change · top-ranked remediation: Low effort ⇒ about 1–3 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 84 months.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Add a CI workflow that builds and runs the test suite on every push/PR. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Add a CI workflow that builds and runs the test suite on every push/PR.
Architecture — module dependency matrix
12 modules, 8 dependencies — every dependency points down the layering, so there are no cycles. Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)
At a glance — Code Health · 46% · Weak · gated by D1, D2
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A03:2021 — Injection
34
High / Critical
A05:2021 — Security Misconfiguration
4
High / Critical
Roadmap
First, establish a continuous integration workflow that builds the code and runs the test suite on every push or pull request. Next, integrate security and performance tooling, such as bandit or semgrep, into this pipeline to ensure security regressions fail the build. Then, address the single missing automated test to improve code coverage and test distribution. Finally, add a health check to the deployed service and configure immutable image tags to enable reliable rollbacks.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No automated tests finding(s) in Code Coverage.
Run what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Add a `healthcheck:` to the served compose service — probing the endpoint it already answers on where it has one — with `depends_on: condition: service_healthy` on whatever waits for it, and keep the deployed image tag immutable and recorded so rolling back is re-pointing at the previous tag rather than rebuilding.
Stamp a version in your build/package manifest (e.g. csproj <Version>, package.json, pyproject.toml, Cargo.toml, or a VERSION file) or tag releases with semver so builds and releases are traceable.
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 30 of 32 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 2 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.5 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 32 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 528 of 534 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D30 Dependency Vulnerabilities — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity (jscpd) — it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D8 Code Coverage: Coverage is measured by building and running the test suite inside Watchdog's isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A clean result is "no unlabelled native control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score (documentation, ADR quality, naming, comment value, onboarding) — D25 sets the ADR-conformance fraction over sampled code, D22 judges API accuracy over a sample. These are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
+ 81 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 Camera.applyControls (cyclomatic 85) finding(s) in Cyclomatic Complexity — start with camera_pi.py. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 photoseries.tlseries_properties (cyclomatic 77) finding(s) in Cyclomatic Complexity — start with photoseries.py. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 CameraController.requestConfig (cyclomatic 72) finding(s) in Cyclomatic Complexity — start with camera_pi.py. — One of this dimension's main actionable groups (1 warning-level).
Stand up a CI pipeline, then gate Cyclomatic Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 200 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 photoseries.tlseries_properties (cognitive 327) finding(s) in Cognitive Complexity — start with photoseries.py. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Camera._photoSeriesThread (cognitive 216) finding(s) in Cognitive Complexity — start with camera_pi.py. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 config.liveViewCfg (cognitive 192) finding(s) in Cognitive Complexity — start with config.py. — One of this dimension's main actionable groups (1 warning-level).
Stand up a CI pipeline, then gate Cognitive Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.1 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
TooManyMethods: Camera · ×2raspiCamSrv/camera_pi.py:1503
What to do
Resolve the 14 FileTooLong finding(s) in God Classes — start with camCfg.py, camera_pi.py, settings.py. — One of this dimension's main actionable groups (14 warning-level).
Resolve the 2 TooManyMethods finding(s) in God Classes — start with camera_pi.py, camCfg.py. — One of this dimension's main actionable groups (2 warning-level).
Stand up a CI pipeline, then gate God Classes in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
+ 49 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 27 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with camera_pi.py (5), home.py (5), trigger.py (3). — One of this dimension's main actionable groups (27 warning-level).
Resolve the 21 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with camera_pi.py (4), webcam.py (4), api.py (3). — One of this dimension's main actionable groups (21 warning-level).
Resolve the 16 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with camCfg.py (3), camera_pi.py (2), home.py (2). — One of this dimension's main actionable groups (16 warning-level).
Stand up a CI pipeline, then gate Code Duplication in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D8 · Code Coverage0.0 / 10Critical✓ Tool-verified
What it measures: How much of the code is actually exercised by tests.
Method: Coverage from coverlet runs or committed reports (Cobertura/OpenCover/lcov), computed per-file with structured exclusions for generated, trivial, and glue code. When the suite can't be built/run in-image AND no report is committed, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.
No automated tests — no test code was found in this repository.
No automated tests
What to do
Resolve the 1 No automated tests finding(s) in Code Coverage. — One of this dimension's main actionable groups (1 issue-level).
Stand up a CI pipeline, then gate Code Coverage in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d8_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution0.0 / 10Critical✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 3 Hotspot finding(s) in Churn × Complexity Hotspots — start with camera_pi.py, motionDetector.py, __init__.py. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor8.2 / 10Strong✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
15 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is raspiCamSrv/camera_pi.py.
Small-team knowledge concentration
What to do
Resolve the 1 Small-team knowledge concentration finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
The raspiCamSrv documentation is clear and complete for a hardware-software project: an informative README with installation, usage, and multi-camera features plus a dedicated Updating guide covering pre-update checks, the Settings/Update dialog, and restart commands; system_setup.md covers OS installation via Imager and notes lite variants; service_configuration.md explains systemd configuration of the Flask server to run independently on boot. The architecture is described in depth across 86 markdown files (not shown here), so the outlined sections are present and not flagged as missing.
The document begins with a 'To get started' list that links to the User Guide, but no steps follow for updating when running Docker (the SetupDocker.md path is referenced), and there is no mention of rollback or reconfiguration after an update.docs/updating_raspiCamSrv.md
What to do
Resolve the 1 The document begins with a 'To get started' list that links to the User… finding(s) in Documentation Quality — start with updating_raspiCamSrv.md. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Git-history secret scan via gitleaks detect over full history in an isolated checkout; each match flagged High. Exhaustive; degrades cleanly when tool absent.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
High: dangerous-subprocess-use · ×4raspiCamSrv/console.py:62detected by semgrep finding
Medium: python-logger-credential-disclosure · ×30raspiCamSrv/camCfg.py:1473detected by semgrep finding
What to do
Resolve the 30 Medium finding(s) in Static Analysis (SAST) — start with main.html (16), index.html (9), console.html (2). — One of this dimension's main actionable groups (30 warning-level).
Resolve the 4 High finding(s) in Static Analysis (SAST) — start with console.py (2), home.py, settings.py. — One of this dimension's main actionable groups (4 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling; coupling through a build step, config, or non-source file isn't seen.
What it measures: Whether dependencies have known published vulnerabilities (CVEs) per the OSV database — read natively from whatever lockfile the repository ships (Cargo, npm, Go, Python, Maven, RubyGems, …). D33 and D30 add ecosystem-specific scanners on top for npm and .NET.
Method: Multi-ecosystem dependency-CVE scan via osv-scanner --recursive (queries the osv.dev database + parses lockfiles natively across ecosystems: npm package-lock/yarn/pnpm/bun, Go go.mod, Rust Cargo.lock, Maven/Gradle pom.xml/gradle.lockfile, PyPI requirements.txt/poetry.lock/Pipfile.lock, Composer composer.lock, RubyGems Gemfile.lock, Hex mix.lock, pub pubspec.lock, Swift Package.resolved); severity tally (Critical/High/Medium/Low) to 0-10 tight normalizer (8.0). NotApplicable only when the repo declares no supported non-.NET dependency lockfile (a NuGet-only repo stays NotApplicable — .NET CVEs are D30's domain); coverage needs a resolved lockfile. Additive to D33 (trivy fs); exhaustive + deterministic, DB kept fresh.
AC1 · Text alternatives6.1 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×2) — index.html:1638, index.html:1872
Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation). — media_viewer.html:37
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels6.8 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×6) — main.html:53, main.html:77, main.html:84, …
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Do you agree with this assessment?
AC3 · Page structure3.8 / 10Weak✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×2) — base.html:2, media_viewer.html:2
A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). (×11) — main.html:81, index.html:1520, index.html:1869, …
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler. (×14) — base.html:37, main.html:115, console.html:29, …
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Do you agree with this assessment?
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
No accessibility enforcement found — no automated accessibility check runs over your pages. Add an accessibility checker (axe-core, pa11y or Lighthouse) over your HTML in CI and fail the build on new violations.
What to do
Enforce accessibility over your pages: run an accessibility checker (axe-core, pa11y or Lighthouse) against your HTML in CI and fail the build on new violations — these run as standalone tools without adding a package manifest.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Add a 'Testing' section to the root README — how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no `NNNN-title.md` documents and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree with `NNNN-title.md` names is the most discoverable form).
Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Production code isn't grouped under a src/ folder — it all sits under raspiCamSrv/ alongside the root build files, so the conventional src/ boundary between the product and its tooling isn't drawn.
No test surface was found — there are no tests here to separate from production code, so the folder question hasn't been reached yet.
What to do
Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
Start a test surface where your build system looks for one (tests/, test/, spec/, or your ecosystem's test source set) — the separation follows from putting the first tests in the right place.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
Do you agree with this assessment?
P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
What to do
Add a CI workflow that builds and runs the test suite on every push/PR.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build.
What to do
Run what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse.
What to do
Add a `healthcheck:` to the served compose service — probing the endpoint it already answers on where it has one — with `depends_on: condition: service_healthy` on whatever waits for it, and keep the deployed image tag immutable and recorded so rolling back is re-pointing at the previous tag rather than rebuilding.
Add an approval/environment gate (required reviewers / protection rules) before production promotion.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
What to do
Stamp a version in your build/package manifest (e.g. csproj <Version>, package.json, pyproject.toml, Cargo.toml, or a VERSION file) or tag releases with semver so builds and releases are traceable.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Not included — 62 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AX1 Captive dependencies — no DI registrations detected
AX10 Code composition — not assessed — code composition is computed by ROLE over a document set that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX2 Stateful singletons — no singleton implementations detected
AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX4 Dependency direction — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — No tests were found in the analyzed repository to assess for quality.
D11 Test Reliability — Test reliability not included
D12 Dependency Hygiene — Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
D14 License Compliance — Not scored — this repository's package manifest is not parsed for licence data yet. A gap in the analyzer's language coverage, NOT a finding that the repository's licenses are compliant (a Python pyproject.toml/requirements.txt (pip/uv/Poetry)), which this pass does not parse yet — so this dimension asserts nothing about this repository's licensing in either direction.
D17 Explicit Debt — explicit-debt markers are read through a C# workspace today, so they were not read for this repository's language — this asserts nothing about how many markers the code carries. Not scored — this is a gap in the analyzer, not a finding about this repository
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
D22 Internal API Consistency — No exposed public API
D23 Boundary Type-Coupling — Production source is present (.py) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D27 Navigability — No calls could be sampled, so navigability was not assessed — tracing effort is measured over resolved call sites and this target exposed none. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry) — not scanned yet) — where an OSV-supported manifest exists, dependency vulnerabilities for this repository are reported under D38 instead.
D32 Data Compliance (PII/GDPR) — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess.
D33 JS/npm Dependency Vulnerabilities — No JS/npm manifest or lockfile found outside build output (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); no JS dependencies to scan.
D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .gitlab-ci.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, Jenkinsfile, .circleci); there is no build to attest provenance for.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D5 Coupling — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a C#/VB class graph, and this repository's production source is .py, which this pass does not read — so no class could be assessed. Not scored — this is a gap in the analyzer, not a finding about this repository.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this check looks for
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this check looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this check looks for
GD1 Unfinished & placeholder code — no source files
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — no CI workflow found
P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
P8 Schema migrations — not assessed — schema-migration practice is read from a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF2 Allocation hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF3 Async & latency hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
High: dangerous-subprocess-use raspiCamSrv/console.py:62— Detected subprocess function 'execute' with user controlled data. A malicious actor could leverage this to perform command injection. You may consider using 'shlex.escape()'.
High: dangerous-subprocess-use raspiCamSrv/console.py:105— Detected subprocess function 'run' with user controlled data. A malicious actor could leverage this to perform command injection. You may consider using 'shlex.escape()'.
High: dangerous-subprocess-use raspiCamSrv/home.py:1727— Detected subprocess function 'live_execute' with user controlled data. A malicious actor could leverage this to perform command injection. You may consider using 'shlex.escape()'.
High: path-traversal-open raspiCamSrv/settings.py:1056— Found request data in a call to 'open'. Ensure the request data is validated or sanitized, otherwise it could result in path traversal attacks. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
High IaC: DS-0002 Dockerfile— Image user should not be 'root' A container that starts as root runs your process with root's capabilities inside the namespace, so a compromise of the process starts from there. The step: create an unprivileged account in the image (`RUN useradd -r -M app` — or whatever this base image's account tooling is, `adduser` and `useradd` are not both present everywhere`), give it ownership of the paths the process writes at runtime (`COPY --chown=` on those layers, or a `RUN chown -R`), and end the final stage with `USER app` so it is the default at start. Build stages that only compile can stay root; it is the stage that RUNS that needs the account. If the process genuinely requires root — it manages the container runtime, ptraces another process or opens raw devices — say so here rather than making a change that breaks it.
Medium: python-logger-credential-disclosure raspiCamSrv/camCfg.py:1473— Detected a python logger call with a potential hardcoded secret "user: %s, password: %s" being logged. This may lead to secret credentials being exposed. Make sure that the logger is not logging sensitive information. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: subprocess-injection raspiCamSrv/console.py:105— Detected user input entering a `subprocess` call unsafely. This could result in a command injection vulnerability. An attacker could use this vulnerability to execute arbitrary commands on the host, which allows them to download malware, scan sensitive data, or run any command they wish on the server. Do not let users choose the command to run. In general, prefer to use Python API versions of system commands. If you must use subprocess, use a dictionary to allowlist a set of commands.
Medium: path-traversal-open raspiCamSrv/settings.py:1051— Found request data in a call to 'open'. Ensure the request data is validated or sanitized, otherwise it could result in path traversal attacks and therefore sensitive data being leaked. To mitigate, consider using os.path.abspath or os.path.realpath or the pathlib library.
Medium: unquoted-attribute-var raspiCamSrv/templates/config/main.html:744— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/config/main.html:747— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/config/main.html:753— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/config/main.html:756— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/config/main.html:1145— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/config/main.html:1148— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/config/main.html:1154— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/config/main.html:1157— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/config/main.html:1541— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/config/main.html:1544— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/config/main.html:1550— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/config/main.html:1553— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/config/main.html:1918— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/config/main.html:1921— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/config/main.html:1927— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/config/main.html:1930— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/console/console.html:66— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/console/console.html:227— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/home/index.html:1269— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/home/index.html:1272— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/home/index.html:1316— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Medium: unquoted-attribute-var raspiCamSrv/templates/home/index.html:1318— Detected a unquoted template variable as an attribute. If unquoted, a malicious actor could inject custom JavaScript handlers. To fix this, add quotes around the template expression, like this: "{{ expr }}". This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
Duplicated block (11 lines × 2) raspiCamSrv/api.py:135— raspiCamSrv/api.py:135-145 | raspiCamSrv/api.py:222-232 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) raspiCamSrv/api.py:413— raspiCamSrv/api.py:413-423 | raspiCamSrv/api.py:475-485 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) raspiCamSrv/auth.py:261— raspiCamSrv/auth.py:261-271 | raspiCamSrv/auth.py:284-294 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) raspiCamSrv/camCfg.py:832— raspiCamSrv/camCfg.py:832-842 | raspiCamSrv/camCfg.py:849-859 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) raspiCamSrv/camCfg.py:8075— raspiCamSrv/camCfg.py:8075-8085 | raspiCamSrv/camCfg.py:8168-8178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) raspiCamSrv/camera_pi.py:1009— raspiCamSrv/camera_pi.py:1009-1019 | raspiCamSrv/camera_pi.py:3783-3793 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) raspiCamSrv/camera_pi.py:1821— raspiCamSrv/camera_pi.py:1821-1831 | raspiCamSrv/camera_pi.py:2209-2219 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/camera_pi.py:1821` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) raspiCamSrv/camera_pi.py:5313— raspiCamSrv/camera_pi.py:5313-5324 | raspiCamSrv/camera_pi.py:5864-5874 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/camera_pi.py:5313` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) raspiCamSrv/camera_pi.py:5334— raspiCamSrv/camera_pi.py:5334-5344 | raspiCamSrv/camera_pi.py:5887-5897 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/camera_pi.py:5334` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) raspiCamSrv/camera_pi.py:5454— raspiCamSrv/camera_pi.py:5454-5465 | raspiCamSrv/camera_pi.py:6010-6020 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/camera_pi.py:5454` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) raspiCamSrv/home.py:140— raspiCamSrv/home.py:140-150 | raspiCamSrv/home.py:224-234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) raspiCamSrv/home.py:346— raspiCamSrv/home.py:346-356 | raspiCamSrv/home.py:1651-1661 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) raspiCamSrv/home.py:560— raspiCamSrv/home.py:560-570 | raspiCamSrv/home.py:608-618 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) raspiCamSrv/home.py:1201— raspiCamSrv/home.py:1201-1211 | raspiCamSrv/webcam.py:584-594 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (11 lines × 2) raspiCamSrv/home.py:1675— raspiCamSrv/home.py:1675-1685 | raspiCamSrv/home.py:1706-1716 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) raspiCamSrv/images.py:204— raspiCamSrv/images.py:204-214 | raspiCamSrv/images.py:221-231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) raspiCamSrv/images.py:349— raspiCamSrv/images.py:349-359 | raspiCamSrv/images.py:362-372 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) raspiCamSrv/motionDetector.py:252— raspiCamSrv/motionDetector.py:252-262 | raspiCamSrv/motionDetector.py:283-293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) raspiCamSrv/settings.py:138— raspiCamSrv/settings.py:138-148 | raspiCamSrv/webcam.py:296-307 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (11 lines × 2) raspiCamSrv/settings.py:1653— raspiCamSrv/settings.py:1653-1663 | raspiCamSrv/trigger.py:1219-1229 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (11 lines × 2) raspiCamSrv/trigger.py:239— raspiCamSrv/trigger.py:239-249 | raspiCamSrv/trigger.py:515-525 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) raspiCamSrv/trigger.py:778— raspiCamSrv/trigger.py:778-788 | raspiCamSrv/trigger.py:853-863 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) raspiCamSrv/trigger.py:1308— raspiCamSrv/trigger.py:1308-1318 | raspiCamSrv/trigger.py:1326-1336 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) raspiCamSrv/triggerHandler.py:1367— raspiCamSrv/triggerHandler.py:1367-1377 | raspiCamSrv/triggerHandler.py:1404-1414 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/triggerHandler.py:1367` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) raspiCamSrv/webcam.py:285— raspiCamSrv/webcam.py:285-295 | raspiCamSrv/webcam.py:374-384 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) raspiCamSrv/api.py:88— raspiCamSrv/api.py:88-97 | raspiCamSrv/api.py:173-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) raspiCamSrv/api.py:112— raspiCamSrv/api.py:112-121 | raspiCamSrv/api.py:198-207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) raspiCamSrv/api.py:473— raspiCamSrv/api.py:473-482 | raspiCamSrv/api.py:536-545 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) raspiCamSrv/auth.py:29— raspiCamSrv/auth.py:29-38 | raspiCamSrv/auth.py:103-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) raspiCamSrv/camCfg.py:243— raspiCamSrv/camCfg.py:243-252 | raspiCamSrv/camCfg.py:443-452 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) raspiCamSrv/camCfg.py:1454— raspiCamSrv/camCfg.py:1454-1463 | raspiCamSrv/camCfg.py:2811-2820 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) raspiCamSrv/camCfg.py:8130— raspiCamSrv/camCfg.py:8130-8139 | raspiCamSrv/camCfg.py:8170-8179 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) raspiCamSrv/camera_pi.py:3508— raspiCamSrv/camera_pi.py:3508-3517 | raspiCamSrv/camera_pi.py:3530-3539 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/camera_pi.py:3508` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) raspiCamSrv/camera_pi.py:4826— raspiCamSrv/camera_pi.py:4826-4835 | raspiCamSrv/camera_pi.py:4930-4939 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/camera_pi.py:4826` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) raspiCamSrv/camera_pi.py:6306— raspiCamSrv/camera_pi.py:6306-6315 | raspiCamSrv/camera_pi.py:6431-6440 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/camera_pi.py:6306` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) raspiCamSrv/camera_pi.py:7610— raspiCamSrv/camera_pi.py:7610-7619 | raspiCamSrv/camera_pi.py:7931-7940 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) raspiCamSrv/config.py:1548— raspiCamSrv/config.py:1548-1557 | raspiCamSrv/config.py:1837-1848 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) raspiCamSrv/config.py:2234— raspiCamSrv/config.py:2234-2243 | raspiCamSrv/config.py:2320-2329 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 2) raspiCamSrv/home.py:1231— raspiCamSrv/home.py:1231-1241 | raspiCamSrv/webcam.py:625-634 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 2) raspiCamSrv/motionAlgoIB.py:554— raspiCamSrv/motionAlgoIB.py:554-563 | raspiCamSrv/motionAlgoIB.py:1060-1069 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) raspiCamSrv/motionAlgoIB.py:597— raspiCamSrv/motionAlgoIB.py:597-606 | raspiCamSrv/motionAlgoIB.py:1120-1129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) raspiCamSrv/triggerHandler.py:141— raspiCamSrv/triggerHandler.py:141-150 | raspiCamSrv/triggerHandler.py:151-160 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) raspiCamSrv/webcam.py:343— raspiCamSrv/webcam.py:343-352 | raspiCamSrv/webcam.py:425-434 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 2) raspiCamSrv/webcam.py:542— raspiCamSrv/webcam.py:542-551 | raspiCamSrv/webcam.py:588-597 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/webcam.py:542` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) raspiCamSrv/webcam.py:1238— raspiCamSrv/webcam.py:1238-1247 | raspiCamSrv/webcam.py:1897-1906 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 2) raspiCamSrv/webcam.py:1392— raspiCamSrv/webcam.py:1392-1401 | raspiCamSrv/webcam.py:1408-1417 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 2) raspiCamSrv/camCfg.py:359— raspiCamSrv/camCfg.py:359-370 | raspiCamSrv/camCfg.py:451-462 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/camCfg.py:359` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) raspiCamSrv/camCfg.py:1430— raspiCamSrv/camCfg.py:1430-1441 | raspiCamSrv/camCfg.py:2787-2798 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) raspiCamSrv/camCfg.py:7400— raspiCamSrv/camCfg.py:7400-7411 | raspiCamSrv/camCfg.py:7423-7434 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/camCfg.py:7400` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) raspiCamSrv/camera_pi.py:6110— raspiCamSrv/camera_pi.py:6110-6121 | raspiCamSrv/camera_pi.py:6135-6146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 2) raspiCamSrv/camera_pi.py:6368— raspiCamSrv/camera_pi.py:6368-6379 | raspiCamSrv/camera_pi.py:6392-6403 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 2) raspiCamSrv/config.py:1299— raspiCamSrv/config.py:1299-1310 | raspiCamSrv/config.py:1826-1837 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) raspiCamSrv/console.py:63— raspiCamSrv/console.py:63-74 | raspiCamSrv/console.py:106-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) raspiCamSrv/home.py:1163— raspiCamSrv/home.py:1163-1174 | raspiCamSrv/webcam.py:535-546 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (12 lines × 2) raspiCamSrv/home.py:1456— raspiCamSrv/home.py:1456-1467 | raspiCamSrv/home.py:1501-1512 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) raspiCamSrv/motionAlgoIB.py:526— raspiCamSrv/motionAlgoIB.py:526-537 | raspiCamSrv/motionAlgoIB.py:725-736 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) raspiCamSrv/photoseries.py:209— raspiCamSrv/photoseries.py:209-220 | raspiCamSrv/photoseries.py:365-376 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) raspiCamSrv/photoseries.py:555— raspiCamSrv/photoseries.py:555-566 | raspiCamSrv/photoseries.py:583-594 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 2) raspiCamSrv/photoseriesCfg.py:59— raspiCamSrv/photoseriesCfg.py:59-70 | raspiCamSrv/photoseriesCfg.py:894-905 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) raspiCamSrv/settings.py:1668— raspiCamSrv/settings.py:1668-1679 | raspiCamSrv/trigger.py:1234-1245 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (12 lines × 2) raspiCamSrv/trigger.py:942— raspiCamSrv/trigger.py:942-953 | raspiCamSrv/trigger.py:1265-1276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) raspiCamSrv/triggerHandler.py:1390— raspiCamSrv/triggerHandler.py:1390-1401 | raspiCamSrv/triggerHandler.py:1447-1458 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/triggerHandler.py:1390` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
FileTooLong: raspiCamSrv/camCfg.py raspiCamSrv/camCfg.py:0— FileTooLong — 6647 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: raspiCamSrv/camera_pi.py raspiCamSrv/camera_pi.py:0— FileTooLong — 6345 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: raspiCamSrv/settings.py raspiCamSrv/settings.py:0— FileTooLong — 2285 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: raspiCamSrv/config.py raspiCamSrv/config.py:0— FileTooLong — 2186 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: raspiCamSrv/webcam.py raspiCamSrv/webcam.py:0— FileTooLong — 1762 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: raspiCamSrv/home.py raspiCamSrv/home.py:0— FileTooLong — 1553 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: raspiCamSrv/photoseriesCfg.py raspiCamSrv/photoseriesCfg.py:0— FileTooLong — 1405 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: raspiCamSrv/trigger.py raspiCamSrv/trigger.py:0— FileTooLong — 1381 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: raspiCamSrv/photoseries.py raspiCamSrv/photoseries.py:0— FileTooLong — 1129 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: raspiCamSrv/motionDetector.py raspiCamSrv/motionDetector.py:0— FileTooLong — 771 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: raspiCamSrv/motionAlgoIB.py raspiCamSrv/motionAlgoIB.py:0— FileTooLong — 770 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: raspiCamSrv/api.py raspiCamSrv/api.py:0— FileTooLong — 695 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: raspiCamSrv/stereoCam.py raspiCamSrv/stereoCam.py:0— FileTooLong — 569 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: raspiCamSrv/gpioDevices.py raspiCamSrv/gpioDevices.py:0— FileTooLong — 557 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Duplicated block (9 lines × 2) raspiCamSrv/camCfg.py:2827— raspiCamSrv/camCfg.py:2827-2835 | raspiCamSrv/camCfg.py:3497-3505 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) raspiCamSrv/camCfg.py:7610— raspiCamSrv/camCfg.py:7610-7618 | raspiCamSrv/camCfg.py:7858-7866 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) raspiCamSrv/camera_pi.py:4268— raspiCamSrv/camera_pi.py:4268-4276 | raspiCamSrv/camera_pi.py:4410-4418 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) raspiCamSrv/camera_pi.py:5362— raspiCamSrv/camera_pi.py:5362-5370 | raspiCamSrv/camera_pi.py:5919-5927 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) raspiCamSrv/camera_pi.py:7505— raspiCamSrv/camera_pi.py:7505-7514 | raspiCamSrv/camera_pi.py:7830-7838 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/camera_pi.py:7505` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) raspiCamSrv/motionAlgoIB.py:499— raspiCamSrv/motionAlgoIB.py:499-507 | raspiCamSrv/motionAlgoIB.py:1005-1013 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) raspiCamSrv/motionDetector.py:635— raspiCamSrv/motionDetector.py:635-643 | raspiCamSrv/triggerHandler.py:1081-1089 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/motionDetector.py:635` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) raspiCamSrv/trigger.py:979— raspiCamSrv/trigger.py:979-987 | raspiCamSrv/trigger.py:994-1002 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) raspiCamSrv/triggerHandler.py:921— raspiCamSrv/triggerHandler.py:921-929 | raspiCamSrv/triggerHandler.py:955-963 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) raspiCamSrv/triggerHandler.py:1336— raspiCamSrv/triggerHandler.py:1336-1344 | raspiCamSrv/triggerHandler.py:1458-1466 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) raspiCamSrv/webcam.py:718— raspiCamSrv/webcam.py:718-726 | raspiCamSrv/webcam.py:760-768 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/webcam.py:718` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) raspiCamSrv/webcam.py:1128— raspiCamSrv/webcam.py:1128-1136 | raspiCamSrv/webcam.py:1203-1211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 2) raspiCamSrv/api.py:37— raspiCamSrv/api.py:37-49 | raspiCamSrv/auth.py:112-124 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (13 lines × 2) raspiCamSrv/auth.py:111— raspiCamSrv/auth.py:111-123 | raspiCamSrv/auth.py:152-164 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) raspiCamSrv/camera_pi.py:900— raspiCamSrv/camera_pi.py:900-912 | raspiCamSrv/camera_pi.py:960-972 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) raspiCamSrv/camera_pi.py:3597— raspiCamSrv/camera_pi.py:3597-3609 | raspiCamSrv/camera_pi.py:3611-3623 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) raspiCamSrv/camera_pi.py:5010— raspiCamSrv/camera_pi.py:5010-5022 | raspiCamSrv/camera_pi.py:5063-5076 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/camera_pi.py:5010` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) raspiCamSrv/config.py:2025— raspiCamSrv/config.py:2025-2038 | raspiCamSrv/config.py:2123-2135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 2) raspiCamSrv/motionDetector.py:758— raspiCamSrv/motionDetector.py:758-770 | raspiCamSrv/triggerHandler.py:50-67 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (13 lines × 2) raspiCamSrv/photoseries.py:154— raspiCamSrv/photoseries.py:154-166 | raspiCamSrv/photoseries.py:311-323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) raspiCamSrv/triggerHandler.py:371— raspiCamSrv/triggerHandler.py:371-383 | raspiCamSrv/triggerHandler.py:865-877 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) raspiCamSrv/api.py:103— raspiCamSrv/api.py:103-109 | raspiCamSrv/api.py:126-132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) raspiCamSrv/camCfg.py:7643— raspiCamSrv/camCfg.py:7643-7649 | raspiCamSrv/camCfg.py:7888-7894 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) raspiCamSrv/camera_pi.py:5484— raspiCamSrv/camera_pi.py:5484-5492 | raspiCamSrv/camera_pi.py:6043-6049 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) raspiCamSrv/camera_pi.py:7291— raspiCamSrv/camera_pi.py:7291-7297 | raspiCamSrv/camera_pi.py:7314-7320 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) raspiCamSrv/camera_pi.py:7646— raspiCamSrv/camera_pi.py:7646-7652 | raspiCamSrv/camera_pi.py:7972-7978 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) raspiCamSrv/photoseriesCfg.py:1202— raspiCamSrv/photoseriesCfg.py:1202-1208 | raspiCamSrv/photoseriesCfg.py:1219-1225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) raspiCamSrv/stereoCam.py:450— raspiCamSrv/stereoCam.py:450-456 | raspiCamSrv/stereoCam.py:475-481 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) raspiCamSrv/triggerHandler.py:620— raspiCamSrv/triggerHandler.py:620-626 | raspiCamSrv/triggerHandler.py:715-721 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) raspiCamSrv/triggerHandler.py:1686— raspiCamSrv/triggerHandler.py:1686-1692 | raspiCamSrv/triggerHandler.py:1724-1730 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) raspiCamSrv/camera_pi.py:1888— raspiCamSrv/camera_pi.py:1888-1901 | raspiCamSrv/camera_pi.py:1910-1923 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/camera_pi.py:1888` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) raspiCamSrv/camera_pi.py:2190— raspiCamSrv/camera_pi.py:2190-2203 | raspiCamSrv/camera_pi.py:2284-2297 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) raspiCamSrv/camera_pi.py:7407— raspiCamSrv/camera_pi.py:7407-7420 | raspiCamSrv/camera_pi.py:7724-7737 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) raspiCamSrv/home.py:1242— raspiCamSrv/home.py:1242-1255 | raspiCamSrv/webcam.py:635-648 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (14 lines × 2) raspiCamSrv/settings.py:234— raspiCamSrv/settings.py:234-247 | raspiCamSrv/settings.py:293-306 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) raspiCamSrv/settings.py:571— raspiCamSrv/settings.py:571-584 | raspiCamSrv/settings.py:655-668 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) raspiCamSrv/settings.py:752— raspiCamSrv/settings.py:752-765 | raspiCamSrv/settings.py:820-833 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) raspiCamSrv/camCfg.py:7050— raspiCamSrv/camCfg.py:7050-7055 | raspiCamSrv/camCfg.py:7062-7067 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) raspiCamSrv/camera_pi.py:7396— raspiCamSrv/camera_pi.py:7396-7401 | raspiCamSrv/camera_pi.py:7713-7718 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) raspiCamSrv/home.py:329— raspiCamSrv/home.py:329-334 | raspiCamSrv/home.py:1623-1628 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) raspiCamSrv/triggerHandler.py:565— raspiCamSrv/triggerHandler.py:565-570 | raspiCamSrv/triggerHandler.py:622-627 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) raspiCamSrv/webcam.py:161— raspiCamSrv/webcam.py:161-166 | raspiCamSrv/webcam.py:207-212 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) raspiCamSrv/camera_pi.py:5267— raspiCamSrv/camera_pi.py:5267-5282 | raspiCamSrv/camera_pi.py:5818-5834 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/camera_pi.py:5267` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) raspiCamSrv/camera_pi.py:5653— raspiCamSrv/camera_pi.py:5653-5668 | raspiCamSrv/camera_pi.py:5729-5744 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) raspiCamSrv/camera_pi.py:7001— raspiCamSrv/camera_pi.py:7001-7016 | raspiCamSrv/camera_pi.py:7018-7033 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) raspiCamSrv/stereoCam.py:181— raspiCamSrv/stereoCam.py:181-196 | raspiCamSrv/stereoCam.py:224-242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/stereoCam.py:181` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) raspiCamSrv/camera_pi.py:2309— raspiCamSrv/camera_pi.py:2309-2323 | raspiCamSrv/camera_pi.py:2336-2350 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/camera_pi.py:2309` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) raspiCamSrv/camera_pi.py:6149— raspiCamSrv/camera_pi.py:6149-6163 | raspiCamSrv/camera_pi.py:6282-6296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) raspiCamSrv/camera_pi.py:7565— raspiCamSrv/camera_pi.py:7565-7579 | raspiCamSrv/camera_pi.py:7884-7898 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) raspiCamSrv/config.py:447— raspiCamSrv/config.py:447-461 | raspiCamSrv/config.py:568-582 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 3) raspiCamSrv/config.py:913— raspiCamSrv/config.py:913-924 | raspiCamSrv/config.py:1234-1245 | raspiCamSrv/config.py:1761-1772 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/config.py:913` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) raspiCamSrv/console.py:36— raspiCamSrv/console.py:36-47 | raspiCamSrv/console.py:82-93 | raspiCamSrv/console.py:125-136 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12 lines × 3) raspiCamSrv/photoseries.py:764— raspiCamSrv/photoseries.py:764-775 | raspiCamSrv/photoseries.py:1032-1043 | raspiCamSrv/photoseries.py:1132-1143 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 3) raspiCamSrv/triggerHandler.py:1770— raspiCamSrv/triggerHandler.py:1770-1781 | raspiCamSrv/triggerHandler.py:1801-1812 | raspiCamSrv/triggerHandler.py:1832-1843 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 2) raspiCamSrv/camera_pi.py:5440— raspiCamSrv/camera_pi.py:5440-5447 | raspiCamSrv/camera_pi.py:5990-5999 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) raspiCamSrv/motionAlgoIB.py:801— raspiCamSrv/motionAlgoIB.py:801-808 | raspiCamSrv/motionAlgoIB.py:1109-1116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) raspiCamSrv/motionDetector.py:116— raspiCamSrv/motionDetector.py:116-123 | raspiCamSrv/motionDetector.py:149-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) raspiCamSrv/photoseriesCfg.py:976— raspiCamSrv/photoseriesCfg.py:976-983 | raspiCamSrv/photoseriesCfg.py:1265-1272 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Hotspot: raspiCamSrv/camera_pi.py raspiCamSrv/camera_pi.py— raspiCamSrv/camera_pi.py changed 3 times in last 90 days, max complexity 85. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: raspiCamSrv/motionDetector.py raspiCamSrv/motionDetector.py— raspiCamSrv/motionDetector.py changed 2 times in last 90 days, max complexity 49. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: raspiCamSrv/__init__.py raspiCamSrv/__init__.py— raspiCamSrv/__init__.py changed 2 times in last 90 days, max complexity 20. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Duplicated block (21 lines × 2) raspiCamSrv/camCfg.py:182— raspiCamSrv/camCfg.py:182-202 | raspiCamSrv/camCfg.py:206-229 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (21 lines × 2) raspiCamSrv/camera_pi.py:333— raspiCamSrv/camera_pi.py:333-353 | raspiCamSrv/camera_pi.py:371-391 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (21 lines × 2) raspiCamSrv/camera_pi.py:3882— raspiCamSrv/camera_pi.py:3882-3902 | raspiCamSrv/camera_pi.py:3933-3953 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18 lines × 2) raspiCamSrv/camera_pi.py:1795— raspiCamSrv/camera_pi.py:1795-1812 | raspiCamSrv/camera_pi.py:1869-1886 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/camera_pi.py:1795` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (18 lines × 2) raspiCamSrv/camera_pi.py:2682— raspiCamSrv/camera_pi.py:2682-2699 | raspiCamSrv/camera_pi.py:2726-2743 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/camera_pi.py:2682` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) raspiCamSrv/triggerHandler.py:1791— raspiCamSrv/triggerHandler.py:1791-1808 | raspiCamSrv/triggerHandler.py:1822-1839 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 3) raspiCamSrv/camera_pi.py:3013— raspiCamSrv/camera_pi.py:3013-3020 | raspiCamSrv/camera_pi.py:3515-3522 | raspiCamSrv/camera_pi.py:3537-3544 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 3) raspiCamSrv/camera_pi.py:7699— raspiCamSrv/camera_pi.py:7699-7706 | raspiCamSrv/camera_pi.py:7866-7873 | raspiCamSrv/camera_pi.py:7966-7973 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 3) raspiCamSrv/images.py:110— raspiCamSrv/images.py:110-117 | raspiCamSrv/images.py:167-174 | raspiCamSrv/images.py:192-199 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 3) raspiCamSrv/camera_pi.py:3416— raspiCamSrv/camera_pi.py:3416-3420 | raspiCamSrv/webcam.py:163-167 | raspiCamSrv/webcam.py:209-213 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5 lines × 3) raspiCamSrv/settings.py:1198— raspiCamSrv/settings.py:1198-1202 | raspiCamSrv/settings.py:1302-1306 | raspiCamSrv/settings.py:1406-1410 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) raspiCamSrv/settings.py:1211— raspiCamSrv/settings.py:1211-1215 | raspiCamSrv/settings.py:1315-1319 | raspiCamSrv/settings.py:1427-1431 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
TooManyMethods: Camera raspiCamSrv/camera_pi.py:1503— TooManyMethods — 107 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ServerConfig raspiCamSrv/camCfg.py:4412— TooManyMethods — 45 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (19 lines × 3) raspiCamSrv/camera_pi.py:1459— raspiCamSrv/camera_pi.py:1459-1477 | raspiCamSrv/motionDetector.py:46-64 | raspiCamSrv/stereoCam.py:42-60 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (19 lines × 3) raspiCamSrv/config.py:1450— raspiCamSrv/config.py:1450-1468 | raspiCamSrv/config.py:1679-1697 | raspiCamSrv/config.py:1970-1988 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/config.py:1450` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 4) raspiCamSrv/home.py:476— raspiCamSrv/home.py:476-486 | raspiCamSrv/home.py:515-525 | raspiCamSrv/home.py:647-657 | raspiCamSrv/home.py:686-696 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11 lines × 4) raspiCamSrv/webcam.py:84— raspiCamSrv/webcam.py:84-94 | raspiCamSrv/webcam.py:112-122 | raspiCamSrv/webcam.py:140-150 | raspiCamSrv/webcam.py:185-195 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11 lines × 3) raspiCamSrv/home.py:756— raspiCamSrv/home.py:756-766 | raspiCamSrv/home.py:821-831 | raspiCamSrv/home.py:889-899 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11 lines × 3) raspiCamSrv/images.py:238— raspiCamSrv/images.py:238-248 | raspiCamSrv/images.py:259-269 | raspiCamSrv/images.py:324-334 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 7) raspiCamSrv/config.py:1128— raspiCamSrv/config.py:1128-1137 | raspiCamSrv/config.py:1205-1214 | raspiCamSrv/config.py:1429-1438 | raspiCamSrv/config.py:1503-1512 | raspiCamSrv/config.py:1658-1667 | raspiCamSrv/config.py:1732-1741 | raspiCamSrv/config.py:1949-1958 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 7) raspiCamSrv/home.py:434— raspiCamSrv/home.py:434-443 | raspiCamSrv/home.py:479-488 | raspiCamSrv/home.py:518-527 | raspiCamSrv/home.py:563-572 | raspiCamSrv/home.py:611-620 | raspiCamSrv/home.py:650-659 | raspiCamSrv/home.py:689-698 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 3) raspiCamSrv/home.py:1147— raspiCamSrv/home.py:1147-1156 | raspiCamSrv/home.py:1184-1193 | raspiCamSrv/home.py:1219-1228 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 3) raspiCamSrv/webcam.py:232— raspiCamSrv/webcam.py:232-241 | raspiCamSrv/webcam.py:332-341 | raspiCamSrv/webcam.py:414-423 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 4) raspiCamSrv/photoseries.py:898— raspiCamSrv/photoseries.py:898-906 | raspiCamSrv/photoseries.py:909-917 | raspiCamSrv/photoseries.py:920-928 | raspiCamSrv/photoseries.py:931-939 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 4) raspiCamSrv/webcam.py:670— raspiCamSrv/webcam.py:670-678 | raspiCamSrv/webcam.py:834-842 | raspiCamSrv/webcam.py:1042-1050 | raspiCamSrv/webcam.py:1561-1569 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) raspiCamSrv/camera_pi.py:7452— raspiCamSrv/camera_pi.py:7452-7456 | raspiCamSrv/camera_pi.py:7778-7782 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) raspiCamSrv/motionAlgoIB.py:706— raspiCamSrv/motionAlgoIB.py:706-710 | raspiCamSrv/motionAlgoIB.py:1012-1016 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Camera.applyControls (cyclomatic 85) raspiCamSrv/camera_pi.py:4121— Camera.applyControls has cyclomatic complexity 85 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
photoseries.tlseries_properties (cyclomatic 77) raspiCamSrv/photoseries.py:762— photoseries.tlseries_properties has cyclomatic complexity 77 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CameraController.requestConfig (cyclomatic 72) raspiCamSrv/camera_pi.py:768— CameraController.requestConfig has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ServerConfig.initFromDict (cyclomatic 71) raspiCamSrv/camCfg.py:7313— ServerConfig.initFromDict has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Camera._photoSeriesThread (cyclomatic 64) raspiCamSrv/camera_pi.py:6761— Camera._photoSeriesThread has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CameraController.compareConfig (cyclomatic 55) raspiCamSrv/camera_pi.py:1210— CameraController.compareConfig has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
config.liveViewCfg (cyclomatic 55) raspiCamSrv/config.py:864— config.liveViewCfg has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MotionDetector._doAction (cyclomatic 49) raspiCamSrv/motionDetector.py:368— MotionDetector._doAction has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
config.photoCfg (cyclomatic 48) raspiCamSrv/config.py:1186— config.photoCfg has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
config.videoCfg (cyclomatic 47) raspiCamSrv/config.py:1713— config.videoCfg has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
trigger.castType (cyclomatic 41) raspiCamSrv/trigger.py:1140— trigger.castType has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TriggerHandler._logEvent (cyclomatic 41) raspiCamSrv/triggerHandler.py:1263— TriggerHandler._logEvent has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TriggerConfig.checkNotificationRecipient (cyclomatic 38) raspiCamSrv/camCfg.py:1467— TriggerConfig.checkNotificationRecipient has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
settings.serverconfig (cyclomatic 38) raspiCamSrv/settings.py:59— settings.serverconfig has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
trigger.new_action (cyclomatic 37) raspiCamSrv/trigger.py:1262— trigger.new_action has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Camera.setStreamingConfigs (cyclomatic 34) raspiCamSrv/camera_pi.py:3293— Camera.setStreamingConfigs has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
webcam.stereo_config (cyclomatic 34) raspiCamSrv/webcam.py:1227— webcam.stereo_config has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Series.nextTimeSunCtrl (cyclomatic 30) raspiCamSrv/photoseriesCfg.py:1078— Series.nextTimeSunCtrl has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Camera.initCamera (cyclomatic 28) raspiCamSrv/camera_pi.py:1742— Camera.initCamera has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
trigger.notify (cyclomatic 28) raspiCamSrv/trigger.py:398— trigger.notify has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TriggerHandler._doGpioAction (cyclomatic 28) raspiCamSrv/triggerHandler.py:238— TriggerHandler._doGpioAction has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Camera._thread (cyclomatic 27) raspiCamSrv/camera_pi.py:4579— Camera._thread has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CameraCfg.setUsbCamControls (cyclomatic 26) raspiCamSrv/camCfg.py:8231— CameraCfg.setUsbCamControls has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Camera.setSecondCamera (cyclomatic 26) raspiCamSrv/camera_pi.py:3135— Camera.setSecondCamera has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
settings.device_properties (cyclomatic 26) raspiCamSrv/settings.py:1721— settings.device_properties has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TriggerHandler._doCameraAction (cyclomatic 25) raspiCamSrv/triggerHandler.py:766— TriggerHandler._doCameraAction has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
config.customTuning (cyclomatic 24) raspiCamSrv/config.py:424— config.customTuning has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
photoseries.calcSunControlledSeries (cyclomatic 24) raspiCamSrv/photoseries.py:647— photoseries.calcSunControlledSeries has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
settings.test_device (cyclomatic 24) raspiCamSrv/settings.py:1841— settings.test_device has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
trigger.new_trigger (cyclomatic 24) raspiCamSrv/trigger.py:939— trigger.new_trigger has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Camera.switchCamera (cyclomatic 22) raspiCamSrv/camera_pi.py:2126— Camera.switchCamera has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MotionDetector._motionThread (cyclomatic 22) raspiCamSrv/motionDetector.py:786— MotionDetector._motionThread has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
photoseries.continue_series (cyclomatic 22) raspiCamSrv/photoseries.py:306— photoseries.continue_series has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
trigger.trigger_action (cyclomatic 22) raspiCamSrv/trigger.py:1462— trigger.trigger_action has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CameraController.requestStart (cyclomatic 21) raspiCamSrv/camera_pi.py:408— CameraController.requestStart has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
photoseries.start_series (cyclomatic 21) raspiCamSrv/photoseries.py:149— photoseries.start_series has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Series.calcSunCtrlData (cyclomatic 21) raspiCamSrv/photoseriesCfg.py:1005— Series.calcSunCtrlData has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
settings.docalibrate (cyclomatic 21) raspiCamSrv/settings.py:2153— settings.docalibrate has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StereoCam._takeCalibPhotoThread (cyclomatic 21) raspiCamSrv/stereoCam.py:386— StereoCam._takeCalibPhotoThread has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TriggerHandler._initNotificationMessage (cyclomatic 21) raspiCamSrv/triggerHandler.py:880— TriggerHandler._initNotificationMessage has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
raspiCamSrv.create_app (cyclomatic 20) raspiCamSrv/__init__.py:15— raspiCamSrv.create_app has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Camera.usbFrameApplyControls (cyclomatic 20) raspiCamSrv/camera_pi.py:4006— Camera.usbFrameApplyControls has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Camera.stopCameraSystem (cyclomatic 20) raspiCamSrv/camera_pi.py:4459— Camera.stopCameraSystem has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Camera.takeImage (cyclomatic 20) raspiCamSrv/camera_pi.py:5238— Camera.takeImage has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Camera.takeRawImage (cyclomatic 20) raspiCamSrv/camera_pi.py:5799— Camera.takeRawImage has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
config.enableAi (cyclomatic 20) raspiCamSrv/config.py:2199— config.enableAi has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
webcam.doInitCalibration (cyclomatic 20) raspiCamSrv/webcam.py:1831— webcam.doInitCalibration has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Camera.getActiveCamera (cyclomatic 19) raspiCamSrv/camera_pi.py:1972— Camera.getActiveCamera has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
config.ai_settings (cyclomatic 19) raspiCamSrv/config.py:2283— config.ai_settings has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MotionDetector._stopAction (cyclomatic 19) raspiCamSrv/motionDetector.py:686— MotionDetector._stopAction has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Series.logPhoto (cyclomatic 19) raspiCamSrv/photoseriesCfg.py:1416— Series.logPhoto has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Camera.loadCameraSpecifics (cyclomatic 18) raspiCamSrv/camera_pi.py:2904— Camera.loadCameraSpecifics has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
config.doSyncAspectRatio (cyclomatic 18) raspiCamSrv/config.py:122— config.doSyncAspectRatio has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
config.defaultTuning (cyclomatic 18) raspiCamSrv/config.py:545— config.defaultTuning has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
config.getAiModelFiles (cyclomatic 18) raspiCamSrv/config.py:2004— config.getAiModelFiles has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MotionDetectOpticalFlow.detectMotion (cyclomatic 18) raspiCamSrv/motionAlgoIB.py:664— MotionDetectOpticalFlow.detectMotion has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MotionDetector.prepareRoIs (cyclomatic 18) raspiCamSrv/motionDetector.py:194— MotionDetector.prepareRoIs has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
settings.castType (cyclomatic 18) raspiCamSrv/settings.py:1638— settings.castType has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
trigger.trgcontrol (cyclomatic 18) raspiCamSrv/trigger.py:72— trigger.trgcontrol has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TriggerConfig.checkRoisAgainstScalerCropLiveView (cyclomatic 17) raspiCamSrv/camCfg.py:820— TriggerConfig.checkRoisAgainstScalerCropLiveView has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ServerConfig.checkMicrophone (cyclomatic 17) raspiCamSrv/camCfg.py:6887— ServerConfig.checkMicrophone has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ServerConfig._countThreads (cyclomatic 17) raspiCamSrv/camCfg.py:7196— ServerConfig._countThreads has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Camera.takeImage2 (cyclomatic 17) raspiCamSrv/camera_pi.py:5377— Camera.takeImage2 has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Camera.cameraStatus (cyclomatic 17) raspiCamSrv/camera_pi.py:7225— Camera.cameraStatus has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
config.setAiModelFile (cyclomatic 17) raspiCamSrv/config.py:2102— config.setAiModelFile has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
images.getFileList (cyclomatic 17) raspiCamSrv/images.py:19— images.getFileList has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
photoseries.series_properties (cyclomatic 17) raspiCamSrv/photoseries.py:460— photoseries.series_properties has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
photoseries.expseries_properties (cyclomatic 17) raspiCamSrv/photoseries.py:1030— photoseries.expseries_properties has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
photoseries.focusstack_properties (cyclomatic 17) raspiCamSrv/photoseries.py:1130— photoseries.focusstack_properties has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TriggerHandler._actionDispatcher (cyclomatic 17) raspiCamSrv/triggerHandler.py:1480— TriggerHandler._actionDispatcher has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
api.probeTerm (cyclomatic 16) raspiCamSrv/api.py:662— api.probeTerm has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TriggerConfig.getEventList (cyclomatic 16) raspiCamSrv/camCfg.py:1234— TriggerConfig.getEventList has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Camera._thread2 (cyclomatic 16) raspiCamSrv/camera_pi.py:4712— Camera._thread2 has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Camera.framesUsb (cyclomatic 16) raspiCamSrv/camera_pi.py:4814— Camera.framesUsb has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Camera.takeRawImage2 (cyclomatic 16) raspiCamSrv/camera_pi.py:5934— Camera.takeRawImage2 has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Camera._videoThreadUsb (cyclomatic 16) raspiCamSrv/camera_pi.py:6053— Camera._videoThreadUsb has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MotionDetectFrameDiff.detectMotion (cyclomatic 16) raspiCamSrv/motionAlgoIB.py:471— MotionDetectFrameDiff.detectMotion has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MotionDetectBgSubtract.detectMotion (cyclomatic 16) raspiCamSrv/motionAlgoIB.py:977— MotionDetectBgSubtract.detectMotion has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
settings.calibrate_fbwd (cyclomatic 16) raspiCamSrv/settings.py:2007— settings.calibrate_fbwd has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
settings.calibrate_bwd (cyclomatic 16) raspiCamSrv/settings.py:2080— settings.calibrate_bwd has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
settings.calibrate_fwd (cyclomatic 16) raspiCamSrv/settings.py:2256— settings.calibrate_fwd has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
settings.calibrate_ffwd (cyclomatic 16) raspiCamSrv/settings.py:2329— settings.calibrate_ffwd has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
trigger.action_activation (cyclomatic 16) raspiCamSrv/trigger.py:1402— trigger.action_activation has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TriggerHandler._findDeviceInRegistry (cyclomatic 16) raspiCamSrv/triggerHandler.py:81— TriggerHandler._findDeviceInRegistry has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
webcam.switch_cameras (cyclomatic 16) raspiCamSrv/webcam.py:231— webcam.switch_cameras has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
webcam.change_active_camera (cyclomatic 16) raspiCamSrv/webcam.py:331— webcam.change_active_camera has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
photoseries.tlseries_properties (cognitive 327) raspiCamSrv/photoseries.py:762— photoseries.tlseries_properties has cognitive complexity 327 (threshold 15). Drivers by points: if/else 300, loops 18, boolean chains 9 (nesting depth added 255). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera._photoSeriesThread (cognitive 216) raspiCamSrv/camera_pi.py:6761— Camera._photoSeriesThread has cognitive complexity 216 (threshold 15). Drivers by points: if/else 186, loops 17, boolean chains 8, error handling 5 (nesting depth added 148). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.liveViewCfg (cognitive 192) raspiCamSrv/config.py:864— config.liveViewCfg has cognitive complexity 192 (threshold 15). Drivers by points: if/else 180, boolean chains 12 (nesting depth added 133). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webcam.stereo_config (cognitive 186) raspiCamSrv/webcam.py:1227— webcam.stereo_config has cognitive complexity 186 (threshold 15). Drivers by points: if/else 170, error handling 16 (nesting depth added 138). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
trigger.new_action (cognitive 182) raspiCamSrv/trigger.py:1262— trigger.new_action has cognitive complexity 182 (threshold 15). Drivers by points: if/else 159, loops 21, boolean chains 2 (nesting depth added 137). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.photoCfg (cognitive 160) raspiCamSrv/config.py:1186— config.photoCfg has cognitive complexity 160 (threshold 15). Drivers by points: if/else 148, boolean chains 12 (nesting depth added 111). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.videoCfg (cognitive 157) raspiCamSrv/config.py:1713— config.videoCfg has cognitive complexity 157 (threshold 15). Drivers by points: if/else 145, boolean chains 12 (nesting depth added 109). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.serverconfig (cognitive 144) raspiCamSrv/settings.py:59— settings.serverconfig has cognitive complexity 144 (threshold 15). Drivers by points: if/else 130, loops 10, boolean chains 4 (nesting depth added 102). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CameraController.requestConfig (cognitive 140) raspiCamSrv/camera_pi.py:768— CameraController.requestConfig has cognitive complexity 140 (threshold 15). Drivers by points: if/else 135, loops 3, boolean chains 2 (nesting depth added 74). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ServerConfig.initFromDict (cognitive 136) raspiCamSrv/camCfg.py:7313— ServerConfig.initFromDict has cognitive complexity 136 (threshold 15). Drivers by points: loops 72, if/else 64 (nesting depth added 94). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Camera.applyControls (cognitive 129) raspiCamSrv/camera_pi.py:4121— Camera.applyControls has cognitive complexity 129 (threshold 15). Drivers by points: if/else 101, boolean chains 28 (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.test_device (cognitive 116) raspiCamSrv/settings.py:1841— settings.test_device has cognitive complexity 116 (threshold 15). Drivers by points: if/else 83, error handling 21, loops 12 (nesting depth added 88). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
trigger.castType (cognitive 115) raspiCamSrv/trigger.py:1140— trigger.castType has cognitive complexity 115 (threshold 15). Drivers by points: if/else 95, error handling 14, loops 5, boolean chains 1 (nesting depth added 79). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CameraController.compareConfig (cognitive 108) raspiCamSrv/camera_pi.py:1210— CameraController.compareConfig has cognitive complexity 108 (threshold 15). Drivers by points: if/else 104, loops 3, boolean chains 1 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Series.nextTimeSunCtrl (cognitive 108) raspiCamSrv/photoseriesCfg.py:1078— Series.nextTimeSunCtrl has cognitive complexity 108 (threshold 15). Drivers by points: if/else 97, loops 9, boolean chains 2 (nesting depth added 71). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MotionDetector._doAction (cognitive 105) raspiCamSrv/motionDetector.py:368— MotionDetector._doAction has cognitive complexity 105 (threshold 15). Drivers by points: if/else 94, boolean chains 11 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.customTuning (cognitive 100) raspiCamSrv/config.py:424— config.customTuning has cognitive complexity 100 (threshold 15). Drivers by points: if/else 88, error handling 12 (nesting depth added 75). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.setStreamingConfigs (cognitive 97) raspiCamSrv/camera_pi.py:3293— Camera.setStreamingConfigs has cognitive complexity 97 (threshold 15). Drivers by points: if/else 87, loops 7, boolean chains 3 (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerConfig.checkNotificationRecipient (cognitive 90) raspiCamSrv/camCfg.py:1467— TriggerConfig.checkNotificationRecipient has cognitive complexity 90 (threshold 15). Drivers by points: if/else 73, error handling 17 (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
trigger.notify (cognitive 86) raspiCamSrv/trigger.py:398— trigger.notify has cognitive complexity 86 (threshold 15). Drivers by points: if/else 84, boolean chains 2 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CameraController.requestStart (cognitive 80) raspiCamSrv/camera_pi.py:408— CameraController.requestStart has cognitive complexity 80 (threshold 15). Drivers by points: if/else 71, error handling 8, boolean chains 1 (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.docalibrate (cognitive 79) raspiCamSrv/settings.py:2153— settings.docalibrate has cognitive complexity 79 (threshold 15). Drivers by points: if/else 58, error handling 16, loops 5 (nesting depth added 59). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler._logEvent (cognitive 79) raspiCamSrv/triggerHandler.py:1263— TriggerHandler._logEvent has cognitive complexity 79 (threshold 15). Drivers by points: if/else 78, boolean chains 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler._doGpioAction (cognitive 75) raspiCamSrv/triggerHandler.py:238— TriggerHandler._doGpioAction has cognitive complexity 75 (threshold 15). Drivers by points: if/else 61, error handling 7, loops 7 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
trigger.trigger_action (cognitive 72) raspiCamSrv/trigger.py:1462— trigger.trigger_action has cognitive complexity 72 (threshold 15). Drivers by points: if/else 54, loops 16, boolean chains 2 (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
photoseries.continue_series (cognitive 71) raspiCamSrv/photoseries.py:306— photoseries.continue_series has cognitive complexity 71 (threshold 15). Drivers by points: if/else 68, boolean chains 3 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
trigger.new_trigger (cognitive 71) raspiCamSrv/trigger.py:939— trigger.new_trigger has cognitive complexity 71 (threshold 15). Drivers by points: if/else 63, loops 8 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler._initNotificationMessage (cognitive 70) raspiCamSrv/triggerHandler.py:880— TriggerHandler._initNotificationMessage has cognitive complexity 70 (threshold 15). Drivers by points: if/else 61, loops 9 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.initCamera (cognitive 69) raspiCamSrv/camera_pi.py:1742— Camera.initCamera has cognitive complexity 69 (threshold 15). Drivers by points: if/else 57, error handling 9, boolean chains 3 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
photoseries.start_series (cognitive 69) raspiCamSrv/photoseries.py:149— photoseries.start_series has cognitive complexity 69 (threshold 15). Drivers by points: if/else 67, boolean chains 2 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MotionDetector._motionThread (cognitive 68) raspiCamSrv/motionDetector.py:786— MotionDetector._motionThread has cognitive complexity 68 (threshold 15). Drivers by points: if/else 62, error handling 3, boolean chains 2, loops 1 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
photoseries.calcSunControlledSeries (cognitive 68) raspiCamSrv/photoseries.py:647— photoseries.calcSunControlledSeries has cognitive complexity 68 (threshold 15). Drivers by points: if/else 57, loops 9, boolean chains 2 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.setSecondCamera (cognitive 65) raspiCamSrv/camera_pi.py:3135— Camera.setSecondCamera has cognitive complexity 65 (threshold 15). Drivers by points: if/else 53, boolean chains 4, error handling 4, loops 4 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
photoseries.expseries_properties (cognitive 65) raspiCamSrv/photoseries.py:1030— photoseries.expseries_properties has cognitive complexity 65 (threshold 15). Drivers by points: if/else 63, boolean chains 2 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ServerConfig.checkMicrophone (cognitive 63) raspiCamSrv/camCfg.py:6887— ServerConfig.checkMicrophone has cognitive complexity 63 (threshold 15). Drivers by points: if/else 53, loops 8, error handling 2 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MotionDetector._stopAction (cognitive 63) raspiCamSrv/motionDetector.py:686— MotionDetector._stopAction has cognitive complexity 63 (threshold 15). Drivers by points: if/else 59, boolean chains 4 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.defaultTuning (cognitive 62) raspiCamSrv/config.py:545— config.defaultTuning has cognitive complexity 62 (threshold 15). Drivers by points: if/else 62 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler._actionDispatcher (cognitive 62) raspiCamSrv/triggerHandler.py:1480— TriggerHandler._actionDispatcher has cognitive complexity 62 (threshold 15). Drivers by points: if/else 56, loops 6 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.remove_users (cognitive 60) raspiCamSrv/settings.py:746— settings.remove_users has cognitive complexity 60 (threshold 15). Drivers by points: if/else 39, loops 21 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ServerConfig._countThreads (cognitive 59) raspiCamSrv/camCfg.py:7196— ServerConfig._countThreads has cognitive complexity 59 (threshold 15). Drivers by points: if/else 56, error handling 2, loops 1 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.calibrate_fbwd (cognitive 56) raspiCamSrv/settings.py:2007— settings.calibrate_fbwd has cognitive complexity 56 (threshold 15). Drivers by points: if/else 40, error handling 16 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.calibrate_bwd (cognitive 56) raspiCamSrv/settings.py:2080— settings.calibrate_bwd has cognitive complexity 56 (threshold 15). Drivers by points: if/else 40, error handling 16 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.calibrate_fwd (cognitive 56) raspiCamSrv/settings.py:2256— settings.calibrate_fwd has cognitive complexity 56 (threshold 15). Drivers by points: if/else 40, error handling 16 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.calibrate_ffwd (cognitive 56) raspiCamSrv/settings.py:2329— settings.calibrate_ffwd has cognitive complexity 56 (threshold 15). Drivers by points: if/else 40, error handling 16 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.device_properties (cognitive 55) raspiCamSrv/settings.py:1721— settings.device_properties has cognitive complexity 55 (threshold 15). Drivers by points: if/else 51, error handling 2, loops 2 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Series.calcSunCtrlData (cognitive 54) raspiCamSrv/photoseriesCfg.py:1005— Series.calcSunCtrlData has cognitive complexity 54 (threshold 15). Drivers by points: if/else 53, boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.setAiModelFile (cognitive 52) raspiCamSrv/config.py:2102— config.setAiModelFile has cognitive complexity 52 (threshold 15). Drivers by points: if/else 49, error handling 2, boolean chains 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Trigger.initFromDict (cognitive 51) raspiCamSrv/camCfg.py:333— Trigger.initFromDict has cognitive complexity 51 (threshold 15). Drivers by points: if/else 38, loops 13 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.enableAi (cognitive 50) raspiCamSrv/config.py:2199— config.enableAi has cognitive complexity 50 (threshold 15). Drivers by points: if/else 48, boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StereoCam._takeCalibPhotoThread (cognitive 50) raspiCamSrv/stereoCam.py:386— StereoCam._takeCalibPhotoThread has cognitive complexity 50 (threshold 15). Drivers by points: if/else 46, error handling 2, boolean chains 1, loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webcam.switch_cameras (cognitive 50) raspiCamSrv/webcam.py:231— webcam.switch_cameras has cognitive complexity 50 (threshold 15). Drivers by points: if/else 47, loops 3 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.switchCamera (cognitive 49) raspiCamSrv/camera_pi.py:2126— Camera.switchCamera has cognitive complexity 49 (threshold 15). Drivers by points: if/else 39, error handling 8, boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.stopCameraSystem (cognitive 48) raspiCamSrv/camera_pi.py:4459— Camera.stopCameraSystem has cognitive complexity 48 (threshold 15). Drivers by points: if/else 39, loops 9 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.cameraStatus (cognitive 48) raspiCamSrv/camera_pi.py:7225— Camera.cameraStatus has cognitive complexity 48 (threshold 15). Drivers by points: if/else 41, loops 6, boolean chains 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.getAiModelFiles (cognitive 48) raspiCamSrv/config.py:2004— config.getAiModelFiles has cognitive complexity 48 (threshold 15). Drivers by points: if/else 42, loops 3, error handling 2, boolean chains 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
images.download_selected (cognitive 48) raspiCamSrv/images.py:323— images.download_selected has cognitive complexity 48 (threshold 15). Drivers by points: if/else 43, loops 5 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
photoseries.focusstack_properties (cognitive 48) raspiCamSrv/photoseries.py:1130— photoseries.focusstack_properties has cognitive complexity 48 (threshold 15). Drivers by points: if/else 46, boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler._waitForCompletion (cognitive 47) raspiCamSrv/triggerHandler.py:1223— TriggerHandler._waitForCompletion has cognitive complexity 47 (threshold 15). Drivers by points: if/else 40, loops 7 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
photoseries.series_properties (cognitive 46) raspiCamSrv/photoseries.py:460— photoseries.series_properties has cognitive complexity 46 (threshold 15). Drivers by points: if/else 44, boolean chains 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.delete_device (cognitive 45) raspiCamSrv/settings.py:1563— settings.delete_device has cognitive complexity 45 (threshold 15). Drivers by points: if/else 38, loops 7 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera._thread (cognitive 44) raspiCamSrv/camera_pi.py:4579— Camera._thread has cognitive complexity 44 (threshold 15). Drivers by points: if/else 38, error handling 3, boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.remLiveViewControls (cognitive 44) raspiCamSrv/config.py:1109— config.remLiveViewControls has cognitive complexity 44 (threshold 15). Drivers by points: if/else 30, loops 14 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.remPhotoControls (cognitive 44) raspiCamSrv/config.py:1410— config.remPhotoControls has cognitive complexity 44 (threshold 15). Drivers by points: if/else 30, loops 14 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.remRawControls (cognitive 44) raspiCamSrv/config.py:1639— config.remRawControls has cognitive complexity 44 (threshold 15). Drivers by points: if/else 30, loops 14 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.remVideoControls (cognitive 44) raspiCamSrv/config.py:1930— config.remVideoControls has cognitive complexity 44 (threshold 15). Drivers by points: if/else 30, loops 14 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
trigger.action_activation (cognitive 44) raspiCamSrv/trigger.py:1402— trigger.action_activation has cognitive complexity 44 (threshold 15). Drivers by points: if/else 37, loops 7 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webcam.calib_settings (cognitive 44) raspiCamSrv/webcam.py:1552— webcam.calib_settings has cognitive complexity 44 (threshold 15). Drivers by points: if/else 44 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerConfig.getEventList (cognitive 43) raspiCamSrv/camCfg.py:1234— TriggerConfig.getEventList has cognitive complexity 43 (threshold 15). Drivers by points: if/else 32, loops 9, error handling 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
images.getFileList (cognitive 43) raspiCamSrv/images.py:19— images.getFileList has cognitive complexity 43 (threshold 15). Drivers by points: if/else 31, loops 5, boolean chains 4, error handling 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MotionDetector.prepareRoIs (cognitive 43) raspiCamSrv/motionDetector.py:194— MotionDetector.prepareRoIs has cognitive complexity 43 (threshold 15). Drivers by points: if/else 39, loops 4 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webcam.change_active_camera (cognitive 43) raspiCamSrv/webcam.py:331— webcam.change_active_camera has cognitive complexity 43 (threshold 15). Drivers by points: if/else 41, loops 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.getActiveCamera (cognitive 42) raspiCamSrv/camera_pi.py:1972— Camera.getActiveCamera has cognitive complexity 42 (threshold 15). Drivers by points: if/else 34, loops 6, boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.load_config (cognitive 42) raspiCamSrv/settings.py:873— settings.load_config has cognitive complexity 42 (threshold 15). Drivers by points: if/else 42 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.ai_settings (cognitive 41) raspiCamSrv/config.py:2283— config.ai_settings has cognitive complexity 41 (threshold 15). Drivers by points: if/else 38, boolean chains 3 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
trigger.trgcontrol (cognitive 41) raspiCamSrv/trigger.py:72— trigger.trgcontrol has cognitive complexity 41 (threshold 15). Drivers by points: if/else 38, loops 2, boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
raspiCamSrv.create_app (cognitive 40) raspiCamSrv/__init__.py:15— raspiCamSrv.create_app has cognitive complexity 40 (threshold 15). Drivers by points: if/else 36, boolean chains 2, error handling 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
api.probeTerm (cognitive 39) raspiCamSrv/api.py:662— api.probeTerm has cognitive complexity 39 (threshold 15). Drivers by points: if/else 36, error handling 2, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ServerConfig.checkJwtSettings (cognitive 39) raspiCamSrv/camCfg.py:7077— ServerConfig.checkJwtSettings has cognitive complexity 39 (threshold 15). Drivers by points: if/else 31, error handling 8 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler._doCameraAction (cognitive 39) raspiCamSrv/triggerHandler.py:766— TriggerHandler._doCameraAction has cognitive complexity 39 (threshold 15). Drivers by points: if/else 37, boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StereoConfig.getNextPhotoIdx (cognitive 38) raspiCamSrv/camCfg.py:4361— StereoConfig.getNextPhotoIdx has cognitive complexity 38 (threshold 15). Drivers by points: if/else 32, loops 6 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CameraCfg.setUsbCamControls (cognitive 38) raspiCamSrv/camCfg.py:8231— CameraCfg.setUsbCamControls has cognitive complexity 38 (threshold 15). Drivers by points: if/else 27, boolean chains 5, loops 4, error handling 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MotionDetectOpticalFlow.detectMotion (cognitive 38) raspiCamSrv/motionAlgoIB.py:664— MotionDetectOpticalFlow.detectMotion has cognitive complexity 38 (threshold 15). Drivers by points: if/else 34, loops 3, boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CameraController.requestStop (cognitive 37) raspiCamSrv/camera_pi.py:632— CameraController.requestStop has cognitive complexity 37 (threshold 15). Drivers by points: if/else 22, error handling 9, loops 6 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.loadCameraSpecifics (cognitive 37) raspiCamSrv/camera_pi.py:2904— Camera.loadCameraSpecifics has cognitive complexity 37 (threshold 15). Drivers by points: if/else 33, boolean chains 2, loops 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.usbFrameApplyControls (cognitive 37) raspiCamSrv/camera_pi.py:4006— Camera.usbFrameApplyControls has cognitive complexity 37 (threshold 15). Drivers by points: if/else 37 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.doSyncAspectRatio (cognitive 37) raspiCamSrv/config.py:122— config.doSyncAspectRatio has cognitive complexity 37 (threshold 15). Drivers by points: if/else 31, loops 5, boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.deleteTuningFile (cognitive 37) raspiCamSrv/config.py:634— config.deleteTuningFile has cognitive complexity 37 (threshold 15). Drivers by points: if/else 34, loops 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
api.record_video_both (cognitive 36) raspiCamSrv/api.py:535— api.record_video_both has cognitive complexity 36 (threshold 15). Drivers by points: if/else 36 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.rawCfg (cognitive 36) raspiCamSrv/config.py:1484— config.rawCfg has cognitive complexity 36 (threshold 15). Drivers by points: if/else 36 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MotionDetectFrameDiff.detectMotion (cognitive 36) raspiCamSrv/motionAlgoIB.py:471— MotionDetectFrameDiff.detectMotion has cognitive complexity 36 (threshold 15). Drivers by points: if/else 33, loops 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MotionDetectBgSubtract.detectMotion (cognitive 36) raspiCamSrv/motionAlgoIB.py:977— MotionDetectBgSubtract.detectMotion has cognitive complexity 36 (threshold 15). Drivers by points: if/else 33, loops 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.castType (cognitive 36) raspiCamSrv/settings.py:1638— settings.castType has cognitive complexity 36 (threshold 15). Drivers by points: if/else 27, loops 5, error handling 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera._videoThreadUsb (cognitive 35) raspiCamSrv/camera_pi.py:6053— Camera._videoThreadUsb has cognitive complexity 35 (threshold 15). Drivers by points: if/else 29, loops 4, boolean chains 1, error handling 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.uploadTuningFile (cognitive 35) raspiCamSrv/config.py:786— config.uploadTuningFile has cognitive complexity 35 (threshold 15). Drivers by points: if/else 28, loops 4, error handling 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
home.focus_control (cognitive 35) raspiCamSrv/home.py:139— home.focus_control has cognitive complexity 35 (threshold 15). Drivers by points: if/else 35 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.api_config (cognitive 35) raspiCamSrv/settings.py:1027— settings.api_config has cognitive complexity 35 (threshold 15). Drivers by points: if/else 29, error handling 5, boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webcam.cam_record_video_both (cognitive 35) raspiCamSrv/webcam.py:963— webcam.cam_record_video_both has cognitive complexity 35 (threshold 15). Drivers by points: if/else 35 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.takeImage (cognitive 34) raspiCamSrv/camera_pi.py:5238— Camera.takeImage has cognitive complexity 34 (threshold 15). Drivers by points: if/else 32, boolean chains 1, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera._videoThread2Usb (cognitive 34) raspiCamSrv/camera_pi.py:6305— Camera._videoThread2Usb has cognitive complexity 34 (threshold 15). Drivers by points: if/else 29, loops 4, error handling 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Series.logPhoto (cognitive 34) raspiCamSrv/photoseriesCfg.py:1416— Series.logPhoto has cognitive complexity 34 (threshold 15). Drivers by points: if/else 29, loops 5 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
settings.new_device (cognitive 34) raspiCamSrv/settings.py:1435— settings.new_device has cognitive complexity 34 (threshold 15). Drivers by points: if/else 23, loops 11 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
trigger.start_triggered_capture (cognitive 34) raspiCamSrv/trigger.py:492— trigger.start_triggered_capture has cognitive complexity 34 (threshold 15). Drivers by points: if/else 33, boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ServerConfig.displayBufferRemove (cognitive 33) raspiCamSrv/camCfg.py:6644— ServerConfig.displayBufferRemove has cognitive complexity 33 (threshold 15). Drivers by points: if/else 25, loops 8 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.takeRawImage (cognitive 33) raspiCamSrv/camera_pi.py:5799— Camera.takeRawImage has cognitive complexity 33 (threshold 15). Drivers by points: if/else 31, boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.vbutton_dimensions (cognitive 33) raspiCamSrv/settings.py:1114— settings.vbutton_dimensions has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22, loops 9, boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.abutton_dimensions (cognitive 33) raspiCamSrv/settings.py:1219— settings.abutton_dimensions has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22, loops 9, boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.lbutton_dimensions (cognitive 33) raspiCamSrv/settings.py:1323— settings.lbutton_dimensions has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22, loops 9, boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.tuningCfg (cognitive 32) raspiCamSrv/config.py:341— config.tuningCfg has cognitive complexity 32 (threshold 15). Drivers by points: if/else 32 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
api.switch_cameras (cognitive 31) raspiCamSrv/api.py:354— api.switch_cameras has cognitive complexity 31 (threshold 15). Drivers by points: if/else 30, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
trigger.test_motion_detection (cognitive 31) raspiCamSrv/trigger.py:214— trigger.test_motion_detection has cognitive complexity 31 (threshold 15). Drivers by points: if/else 31 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler._closeGpioDevices (cognitive 31) raspiCamSrv/triggerHandler.py:1875— TriggerHandler._closeGpioDevices has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22, error handling 6, loops 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
auth.register (cognitive 30) raspiCamSrv/auth.py:27— auth.register has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18, error handling 12 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.startLiveStream2 (cognitive 30) raspiCamSrv/camera_pi.py:2444— Camera.startLiveStream2 has cognitive complexity 30 (threshold 15). Drivers by points: if/else 29, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerConfig.triggerEvents (cognitive 29) raspiCamSrv/camCfg.py:1716— TriggerConfig.triggerEvents has cognitive complexity 29 (threshold 15). Drivers by points: if/else 26, loops 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CameraController.requestCameraForConfig (cognitive 29) raspiCamSrv/camera_pi.py:192— CameraController.requestCameraForConfig has cognitive complexity 29 (threshold 15). Drivers by points: if/else 29 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.framesUsb (cognitive 29) raspiCamSrv/camera_pi.py:4814— Camera.framesUsb has cognitive complexity 29 (threshold 15). Drivers by points: if/else 24, error handling 4, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webcam.cam_record_video (cognitive 28) raspiCamSrv/webcam.py:603— webcam.cam_record_video has cognitive complexity 28 (threshold 15). Drivers by points: if/else 28 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Action.initFromDict (cognitive 27) raspiCamSrv/camCfg.py:440— Action.initFromDict has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18, loops 9 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.takeImage2 (cognitive 27) raspiCamSrv/camera_pi.py:5377— Camera.takeImage2 has cognitive complexity 27 (threshold 15). Drivers by points: if/else 25, boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.draw_detections (cognitive 27) raspiCamSrv/camera_pi.py:7535— Camera.draw_detections has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20, loops 4, boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
home.record_video (cognitive 27) raspiCamSrv/home.py:1218— home.record_video has cognitive complexity 27 (threshold 15). Drivers by points: if/else 27 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
trigger.motion (cognitive 27) raspiCamSrv/trigger.py:146— trigger.motion has cognitive complexity 27 (threshold 15). Drivers by points: if/else 26, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
auth.password (cognitive 26) raspiCamSrv/auth.py:141— auth.password has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16, error handling 10 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerConfig.checkRoisAgainstScalerCropLiveView (cognitive 26) raspiCamSrv/camCfg.py:820— TriggerConfig.checkRoisAgainstScalerCropLiveView has cognitive complexity 26 (threshold 15). Drivers by points: if/else 22, boolean chains 2, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webcam.cam_take_raw_photo_both (cognitive 26) raspiCamSrv/webcam.py:904— webcam.cam_take_raw_photo_both has cognitive complexity 26 (threshold 15). Drivers by points: if/else 26 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CameraInfo.setUsbDev (cognitive 25) raspiCamSrv/camCfg.py:2112— CameraInfo.setUsbDev has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15, error handling 6, loops 3, boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera._thread2 (cognitive 25) raspiCamSrv/camera_pi.py:4712— Camera._thread2 has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, error handling 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.takeRawImage2 (cognitive 25) raspiCamSrv/camera_pi.py:5934— Camera.takeRawImage2 has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, boolean chains 1, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera._videoThread (cognitive 25) raspiCamSrv/camera_pi.py:6172— Camera._videoThread has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17, loops 4, error handling 3, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webcam.doInitCalibration (cognitive 25) raspiCamSrv/webcam.py:1831— webcam.doInitCalibration has cognitive complexity 25 (threshold 15). Drivers by points: if/else 25 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
CameraCfg.setUsbSensorModes (cognitive 24) raspiCamSrv/camCfg.py:8155— CameraCfg.setUsbSensorModes has cognitive complexity 24 (threshold 15). Drivers by points: if/else 21, error handling 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.restoreConfigFromStreamingConfig (cognitive 24) raspiCamSrv/camera_pi.py:3652— Camera.restoreConfigFromStreamingConfig has cognitive complexity 24 (threshold 15). Drivers by points: if/else 24 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
api.take_photo_both (cognitive 23) raspiCamSrv/api.py:125— api.take_photo_both has cognitive complexity 23 (threshold 15). Drivers by points: if/else 23 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
api.take_raw_photo_both (cognitive 23) raspiCamSrv/api.py:211— api.take_raw_photo_both has cognitive complexity 23 (threshold 15). Drivers by points: if/else 23 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.quickPhoto (cognitive 23) raspiCamSrv/camera_pi.py:5496— Camera.quickPhoto has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, error handling 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.getTuningFiles (cognitive 23) raspiCamSrv/config.py:313— config.getTuningFiles has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, loops 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
home.ae_control (cognitive 23) raspiCamSrv/home.py:755— home.ae_control has cognitive complexity 23 (threshold 15). Drivers by points: if/else 23 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
photoseries.new_series (cognitive 23) raspiCamSrv/photoseries.py:47— photoseries.new_series has cognitive complexity 23 (threshold 15). Drivers by points: error handling 12, if/else 11 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler._bouncing (cognitive 23) raspiCamSrv/triggerHandler.py:194— TriggerHandler._bouncing has cognitive complexity 23 (threshold 15). Drivers by points: if/else 23 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler._stageVideoPlaceholder (cognitive 23) raspiCamSrv/triggerHandler.py:386— TriggerHandler._stageVideoPlaceholder has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, loops 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler._doStartVideo (cognitive 23) raspiCamSrv/triggerHandler.py:486— TriggerHandler._doStartVideo has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, boolean chains 1, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler._findActiveCameraAction (cognitive 23) raspiCamSrv/triggerHandler.py:730— TriggerHandler._findActiveCameraAction has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, loops 6 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webcam.cam_take_raw_photo (cognitive 23) raspiCamSrv/webcam.py:557— webcam.cam_take_raw_photo has cognitive complexity 23 (threshold 15). Drivers by points: if/else 23 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.startLiveStream (cognitive 22) raspiCamSrv/camera_pi.py:2387— Camera.startLiveStream has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.addLiveViewControls (cognitive 22) raspiCamSrv/config.py:1050— config.addLiveViewControls has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, loops 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.addPhotoControls (cognitive 22) raspiCamSrv/config.py:1352— config.addPhotoControls has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, loops 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.addRawControls (cognitive 22) raspiCamSrv/config.py:1581— config.addRawControls has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, loops 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.addVideoControls (cognitive 22) raspiCamSrv/config.py:1872— config.addVideoControls has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, loops 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
home.exposure_control (cognitive 22) raspiCamSrv/home.py:820— home.exposure_control has cognitive complexity 22 (threshold 15). Drivers by points: if/else 22 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
home.image_control (cognitive 22) raspiCamSrv/home.py:888— home.image_control has cognitive complexity 22 (threshold 15). Drivers by points: if/else 22 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
home.take_raw_photo (cognitive 22) raspiCamSrv/home.py:1183— home.take_raw_photo has cognitive complexity 22 (threshold 15). Drivers by points: if/else 22 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.parseColorTuple (cognitive 22) raspiCamSrv/settings.py:1693— settings.parseColorTuple has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, loops 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler._doTakePhoto (cognitive 22) raspiCamSrv/triggerHandler.py:634— TriggerHandler._doTakePhoto has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, boolean chains 1, error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler._attachMedia (cognitive 22) raspiCamSrv/triggerHandler.py:992— TriggerHandler._attachMedia has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, loops 6 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
api.record_video (cognitive 21) raspiCamSrv/api.py:411— api.record_video has cognitive complexity 21 (threshold 15). Drivers by points: if/else 21 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CameraController.codeGenConfig (cognitive 21) raspiCamSrv/camera_pi.py:1065— CameraController.codeGenConfig has cognitive complexity 21 (threshold 15). Drivers by points: if/else 21 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Camera.quickVideoStart (cognitive 21) raspiCamSrv/camera_pi.py:5579— Camera.quickVideoStart has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, error handling 3, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera._videoThread2 (cognitive 21) raspiCamSrv/camera_pi.py:6430— Camera._videoThread2 has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 4, error handling 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.cam2_draw_detections (cognitive 21) raspiCamSrv/camera_pi.py:7858— Camera.cam2_draw_detections has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 4, boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MotionDetectAlgoIB.recordMotion (cognitive 21) raspiCamSrv/motionAlgoIB.py:289— MotionDetectAlgoIB.recordMotion has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, loops 8 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.configBackup (cognitive 21) raspiCamSrv/settings.py:411— settings.configBackup has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, error handling 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webcam.change_second_camera (cognitive 21) raspiCamSrv/webcam.py:413— webcam.change_second_camera has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webcam.doCleanup (cognitive 21) raspiCamSrv/webcam.py:1779— webcam.doCleanup has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11, error handling 5, loops 4, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
api.start_triggered_capture (cognitive 20) raspiCamSrv/api.py:251— api.start_triggered_capture has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerConfig.initFromDict (cognitive 20) raspiCamSrv/camCfg.py:1993— TriggerConfig.initFromDict has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, loops 9 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.getUsbCamMetadata (cognitive 20) raspiCamSrv/camera_pi.py:5170— Camera.getUsbCamMetadata has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Series.getPreviewListHistDetail (cognitive 20) raspiCamSrv/photoseriesCfg.py:1344— Series.getPreviewListHistDetail has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, loops 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler._findDeviceInRegistry (cognitive 20) raspiCamSrv/triggerHandler.py:81— TriggerHandler._findDeviceInRegistry has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webcam.cam_take_photo (cognitive 20) raspiCamSrv/webcam.py:510— webcam.cam_take_photo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webcam.take_photo_both (cognitive 20) raspiCamSrv/webcam.py:856— webcam.take_photo_both has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ServerConfig._checkMicrophoneNoJson (cognitive 19) raspiCamSrv/camCfg.py:6833— ServerConfig._checkMicrophoneNoJson has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, error handling 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.get_photoFrame2_hr (cognitive 19) raspiCamSrv/camera_pi.py:2867— Camera.get_photoFrame2_hr has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, error handling 5 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.applyMappedControlToUsbCamera (cognitive 19) raspiCamSrv/camera_pi.py:3846— Camera.applyMappedControlToUsbCamera has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, error handling 4, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.applyControlsForAfCycle (cognitive 19) raspiCamSrv/camera_pi.py:4393— Camera.applyControlsForAfCycle has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, boolean chains 6 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
home.take_photo (cognitive 19) raspiCamSrv/home.py:1146— home.take_photo has cognitive complexity 19 (threshold 15). Drivers by points: if/else 19 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
photoseries.calcSunAzimuthSeries (cognitive 19) raspiCamSrv/photoseries.py:717— photoseries.calcSunAzimuthSeries has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, loops 5, boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Series.nextTime (cognitive 19) raspiCamSrv/photoseriesCfg.py:1235— Series.nextTime has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.calibrate_device (cognitive 19) raspiCamSrv/settings.py:1956— settings.calibrate_device has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, error handling 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
api.propGen (cognitive 18) raspiCamSrv/api.py:636— api.propGen has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerConfig.actionTargets (cognitive 18) raspiCamSrv/camCfg.py:1775— TriggerConfig.actionTargets has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ServerConfig.unregisterStreamingClient (cognitive 18) raspiCamSrv/camCfg.py:5715— ServerConfig.unregisterStreamingClient has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, loops 4, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ServerConfig.displayBufferCheck (cognitive 18) raspiCamSrv/camCfg.py:6710— ServerConfig.displayBufferCheck has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, loops 6 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
home.trigger_autofocus (cognitive 18) raspiCamSrv/home.py:223— home.trigger_autofocus has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MotionDetector.startMotionDetection (cognitive 18) raspiCamSrv/motionDetector.py:878— MotionDetector.startMotionDetection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GPIODevice.initFromDict (cognitive 17) raspiCamSrv/camCfg.py:240— GPIODevice.initFromDict has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, loops 5 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerConfig._parseWindows (cognitive 17) raspiCamSrv/camCfg.py:1429— TriggerConfig._parseWindows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CameraControls._parseWindows (cognitive 17) raspiCamSrv/camCfg.py:2786— CameraControls._parseWindows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CameraConfig.initFromDict (cognitive 17) raspiCamSrv/camCfg.py:3281— CameraConfig.initFromDict has cognitive complexity 17 (threshold 15). Drivers by points: loops 9, if/else 8 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ServerConfig.registerStreamingClient (cognitive 17) raspiCamSrv/camCfg.py:5685— ServerConfig.registerStreamingClient has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, loops 4, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Camera.loadUsbCameraSpecifics (cognitive 17) raspiCamSrv/camera_pi.py:3032— Camera.loadUsbCameraSpecifics has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
home.zoom_in (cognitive 17) raspiCamSrv/home.py:308— home.zoom_in has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Series.nextPhoto (cognitive 17) raspiCamSrv/photoseriesCfg.py:953— Series.nextPhoto has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Series.initFromDict (cognitive 17) raspiCamSrv/photoseriesCfg.py:1548— Series.initFromDict has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
settings.select_device (cognitive 17) raspiCamSrv/settings.py:1494— settings.select_device has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, loops 6 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Sun.find_times_for_azimuth (cognitive 17) raspiCamSrv/sun.py:307— Sun.find_times_for_azimuth has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 2, ternaries 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler._registerGpioTrigger (cognitive 17) raspiCamSrv/triggerHandler.py:1604— TriggerHandler._registerGpioTrigger has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
home.zoom_out (cognitive 16) raspiCamSrv/home.py:400— home.zoom_out has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
images.delete_selected (cognitive 16) raspiCamSrv/images.py:258— images.delete_selected has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
photoseries.pause_series (cognitive 16) raspiCamSrv/photoseries.py:238— photoseries.pause_series has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
photoseries.finish_series (cognitive 16) raspiCamSrv/photoseries.py:271— photoseries.finish_series has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Series.checkPhotos (cognitive 16) raspiCamSrv/photoseriesCfg.py:1520— Series.checkPhotos has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, error handling 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler.doAction (cognitive 16) raspiCamSrv/triggerHandler.py:1116— TriggerHandler.doAction has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler._unregisterGpioTrigger (cognitive 16) raspiCamSrv/triggerHandler.py:1758— TriggerHandler._unregisterGpioTrigger has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler._unregisterCameraTrigger (cognitive 16) raspiCamSrv/triggerHandler.py:1790— TriggerHandler._unregisterCameraTrigger has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriggerHandler._unregisterMotionDetectorTrigger (cognitive 16) raspiCamSrv/triggerHandler.py:1821— TriggerHandler._unregisterMotionDetectorTrigger has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (25 lines × 3) raspiCamSrv/motionAlgoIB.py:472— raspiCamSrv/motionAlgoIB.py:472-496 | raspiCamSrv/motionAlgoIB.py:665-689 | raspiCamSrv/motionAlgoIB.py:978-1002 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/motionAlgoIB.py:472` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (22 lines × 2) raspiCamSrv/camera_pi.py:483— raspiCamSrv/camera_pi.py:483-505 | raspiCamSrv/camera_pi.py:2179-2200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/camera_pi.py:483` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) raspiCamSrv/settings.py:1616— raspiCamSrv/settings.py:1616-1635 | raspiCamSrv/trigger.py:1118-1137 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (17 lines × 2) raspiCamSrv/camera_pi.py:2968— raspiCamSrv/camera_pi.py:2968-2985 | raspiCamSrv/camera_pi.py:3060-3076 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 8) raspiCamSrv/config.py:1086— raspiCamSrv/config.py:1086-1101 | raspiCamSrv/config.py:1163-1178 | raspiCamSrv/config.py:1329-1344 | raspiCamSrv/config.py:1387-1402 | raspiCamSrv/config.py:1558-1573 | raspiCamSrv/config.py:1616-1631 | raspiCamSrv/config.py:1849-1864 | raspiCamSrv/config.py:1907-1922 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/config.py:1086` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 7) raspiCamSrv/config.py:403— raspiCamSrv/config.py:403-418 | raspiCamSrv/config.py:711-726 | raspiCamSrv/config.py:1029-1044 | raspiCamSrv/config.py:2081-2096 | raspiCamSrv/config.py:2178-2193 | raspiCamSrv/config.py:2262-2277 | raspiCamSrv/config.py:2337-2352 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/config.py:403` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 5) raspiCamSrv/settings.py:2017— raspiCamSrv/settings.py:2017-2032 | raspiCamSrv/settings.py:2090-2105 | raspiCamSrv/settings.py:2163-2178 | raspiCamSrv/settings.py:2266-2281 | raspiCamSrv/settings.py:2339-2354 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (16 lines × 4) raspiCamSrv/config.py:67— raspiCamSrv/config.py:67-82 | raspiCamSrv/config.py:525-540 | raspiCamSrv/config.py:614-629 | raspiCamSrv/config.py:844-859 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 18) raspiCamSrv/settings.py:1002— raspiCamSrv/settings.py:1002-1015 | raspiCamSrv/settings.py:1116-1129 | raspiCamSrv/settings.py:1176-1189 | raspiCamSrv/settings.py:1221-1234 | raspiCamSrv/settings.py:1280-1293 | raspiCamSrv/settings.py:1325-1338 | raspiCamSrv/settings.py:1384-1397 | raspiCamSrv/settings.py:1437-1450 | raspiCamSrv/settings.py:1496-1509 | raspiCamSrv/settings.py:1565-1578 | raspiCamSrv/settings.py:1723-1736 | raspiCamSrv/settings.py:1843-1856 | raspiCamSrv/settings.py:1958-1971 | raspiCamSrv/settings.py:2009-2022 | raspiCamSrv/settings.py:2082-2095 | raspiCamSrv/settings.py:2155-2168 | raspiCamSrv/settings.py:2258-2271 | raspiCamSrv/settings.py:2331-2344 — all 18 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (14 lines × 3) raspiCamSrv/settings.py:419— raspiCamSrv/settings.py:419-432 | raspiCamSrv/settings.py:699-712 | raspiCamSrv/settings.py:1035-1048 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 17) raspiCamSrv/settings.py:39— raspiCamSrv/settings.py:39-51 | raspiCamSrv/settings.py:61-73 | raspiCamSrv/settings.py:229-241 | raspiCamSrv/settings.py:288-300 | raspiCamSrv/settings.py:413-425 | raspiCamSrv/settings.py:565-577 | raspiCamSrv/settings.py:649-661 | raspiCamSrv/settings.py:693-705 | raspiCamSrv/settings.py:841-853 | raspiCamSrv/settings.py:875-887 | raspiCamSrv/settings.py:1029-1041 | raspiCamSrv/settings.py:1091-1103 | raspiCamSrv/settings.py:2404-2416 | raspiCamSrv/settings.py:2434-2446 | raspiCamSrv/settings.py:2481-2493 | raspiCamSrv/settings.py:2508-2520 | raspiCamSrv/settings.py:2536-2548 — all 17 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (13 lines × 3) raspiCamSrv/camCfg.py:3294— raspiCamSrv/camCfg.py:3294-3306 | raspiCamSrv/camCfg.py:7337-7349 | raspiCamSrv/camCfg.py:7369-7381 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12 lines × 18) raspiCamSrv/config.py:342— raspiCamSrv/config.py:342-353 | raspiCamSrv/config.py:425-436 | raspiCamSrv/config.py:546-557 | raspiCamSrv/config.py:635-646 | raspiCamSrv/config.py:733-744 | raspiCamSrv/config.py:787-798 | raspiCamSrv/config.py:865-876 | raspiCamSrv/config.py:1110-1121 | raspiCamSrv/config.py:1187-1198 | raspiCamSrv/config.py:1411-1422 | raspiCamSrv/config.py:1485-1496 | raspiCamSrv/config.py:1640-1651 | raspiCamSrv/config.py:1714-1725 | raspiCamSrv/config.py:1931-1942 | raspiCamSrv/config.py:2005-2016 | raspiCamSrv/config.py:2103-2114 | raspiCamSrv/config.py:2200-2211 | raspiCamSrv/config.py:2284-2295 — all 18 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12 lines × 7) raspiCamSrv/home.py:1390— raspiCamSrv/home.py:1390-1401 | raspiCamSrv/home.py:1412-1423 | raspiCamSrv/home.py:1434-1445 | raspiCamSrv/home.py:1479-1490 | raspiCamSrv/home.py:1523-1534 | raspiCamSrv/home.py:1545-1556 | raspiCamSrv/home.py:1567-1578 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12 lines × 4) raspiCamSrv/config.py:1051— raspiCamSrv/config.py:1051-1062 | raspiCamSrv/config.py:1353-1364 | raspiCamSrv/config.py:1582-1593 | raspiCamSrv/config.py:1873-1884 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11 lines × 16) raspiCamSrv/photoseries.py:48— raspiCamSrv/photoseries.py:48-58 | raspiCamSrv/photoseries.py:125-135 | raspiCamSrv/photoseries.py:150-160 | raspiCamSrv/photoseries.py:239-249 | raspiCamSrv/photoseries.py:272-282 | raspiCamSrv/photoseries.py:307-317 | raspiCamSrv/photoseries.py:394-404 | raspiCamSrv/photoseries.py:417-427 | raspiCamSrv/photoseries.py:461-471 | raspiCamSrv/photoseries.py:553-563 | raspiCamSrv/photoseries.py:581-591 | raspiCamSrv/photoseries.py:614-624 | raspiCamSrv/photoseries.py:632-642 | raspiCamSrv/photoseries.py:763-773 | raspiCamSrv/photoseries.py:1031-1041 | raspiCamSrv/photoseries.py:1131-1141 — all 16 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11 lines × 11) raspiCamSrv/trigger.py:73— raspiCamSrv/trigger.py:73-83 | raspiCamSrv/trigger.py:215-225 | raspiCamSrv/trigger.py:265-275 | raspiCamSrv/trigger.py:493-503 | raspiCamSrv/trigger.py:541-551 | raspiCamSrv/trigger.py:738-748 | raspiCamSrv/trigger.py:758-768 | raspiCamSrv/trigger.py:940-950 | raspiCamSrv/trigger.py:1083-1093 | raspiCamSrv/trigger.py:1263-1273 | raspiCamSrv/trigger.py:1463-1473 — all 11 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11 lines × 8) raspiCamSrv/home.py:264— raspiCamSrv/home.py:264-274 | raspiCamSrv/home.py:401-411 | raspiCamSrv/home.py:455-465 | raspiCamSrv/home.py:500-510 | raspiCamSrv/home.py:539-549 | raspiCamSrv/home.py:584-594 | raspiCamSrv/home.py:632-642 | raspiCamSrv/home.py:671-681 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11 lines × 6) raspiCamSrv/trigger.py:598— raspiCamSrv/trigger.py:598-608 | raspiCamSrv/trigger.py:677-687 | raspiCamSrv/trigger.py:807-817 | raspiCamSrv/trigger.py:869-879 | raspiCamSrv/trigger.py:890-900 | raspiCamSrv/trigger.py:915-925 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 5) raspiCamSrv/webcam.py:1555— raspiCamSrv/webcam.py:1555-1565 | raspiCamSrv/webcam.py:1658-1668 | raspiCamSrv/webcam.py:1686-1696 | raspiCamSrv/webcam.py:1723-1733 | raspiCamSrv/webcam.py:1891-1901 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 18) raspiCamSrv/webcam.py:511— raspiCamSrv/webcam.py:511-520 | raspiCamSrv/webcam.py:558-567 | raspiCamSrv/webcam.py:604-613 | raspiCamSrv/webcam.py:660-669 | raspiCamSrv/webcam.py:694-703 | raspiCamSrv/webcam.py:733-742 | raspiCamSrv/webcam.py:775-784 | raspiCamSrv/webcam.py:824-833 | raspiCamSrv/webcam.py:857-866 | raspiCamSrv/webcam.py:905-914 | raspiCamSrv/webcam.py:964-973 | raspiCamSrv/webcam.py:1032-1041 | raspiCamSrv/webcam.py:1080-1089 | raspiCamSrv/webcam.py:1118-1127 | raspiCamSrv/webcam.py:1193-1202 | raspiCamSrv/webcam.py:1228-1237 | raspiCamSrv/webcam.py:1925-1934 | raspiCamSrv/webcam.py:1964-1973 — all 18 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 8) raspiCamSrv/trigger.py:566— raspiCamSrv/trigger.py:566-575 | raspiCamSrv/trigger.py:582-591 | raspiCamSrv/trigger.py:615-624 | raspiCamSrv/trigger.py:631-640 | raspiCamSrv/trigger.py:647-656 | raspiCamSrv/trigger.py:662-671 | raspiCamSrv/trigger.py:693-702 | raspiCamSrv/trigger.py:708-717 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 6) raspiCamSrv/webcam.py:41— raspiCamSrv/webcam.py:41-50 | raspiCamSrv/webcam.py:1554-1563 | raspiCamSrv/webcam.py:1657-1666 | raspiCamSrv/webcam.py:1685-1694 | raspiCamSrv/webcam.py:1722-1731 | raspiCamSrv/webcam.py:1890-1899 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 4) raspiCamSrv/config.py:1070— raspiCamSrv/config.py:1070-1079 | raspiCamSrv/config.py:1372-1381 | raspiCamSrv/config.py:1601-1610 | raspiCamSrv/config.py:1892-1901 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 22) raspiCamSrv/config.py:204— raspiCamSrv/config.py:204-212 | raspiCamSrv/config.py:356-364 | raspiCamSrv/config.py:439-447 | raspiCamSrv/config.py:560-568 | raspiCamSrv/config.py:649-657 | raspiCamSrv/config.py:747-755 | raspiCamSrv/config.py:801-809 | raspiCamSrv/config.py:879-887 | raspiCamSrv/config.py:1066-1074 | raspiCamSrv/config.py:1124-1132 | raspiCamSrv/config.py:1201-1209 | raspiCamSrv/config.py:1368-1376 | raspiCamSrv/config.py:1425-1433 | raspiCamSrv/config.py:1597-1605 | raspiCamSrv/config.py:1654-1662 | raspiCamSrv/config.py:1728-1736 | raspiCamSrv/config.py:1888-1896 | raspiCamSrv/config.py:1945-1953 | raspiCamSrv/config.py:2019-2027 | raspiCamSrv/config.py:2117-2125 | raspiCamSrv/config.py:2214-2222 | raspiCamSrv/config.py:2298-2306 — all 22 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 19) raspiCamSrv/webcam.py:151— raspiCamSrv/webcam.py:151-159 | raspiCamSrv/webcam.py:242-250 | raspiCamSrv/webcam.py:342-350 | raspiCamSrv/webcam.py:424-432 | raspiCamSrv/webcam.py:521-529 | raspiCamSrv/webcam.py:568-576 | raspiCamSrv/webcam.py:614-622 | raspiCamSrv/webcam.py:704-712 | raspiCamSrv/webcam.py:743-751 | raspiCamSrv/webcam.py:785-793 | raspiCamSrv/webcam.py:867-875 | raspiCamSrv/webcam.py:915-923 | raspiCamSrv/webcam.py:974-982 | raspiCamSrv/webcam.py:1090-1098 | raspiCamSrv/webcam.py:1238-1246 | raspiCamSrv/webcam.py:1692-1700 | raspiCamSrv/webcam.py:1897-1905 | raspiCamSrv/webcam.py:1935-1943 | raspiCamSrv/webcam.py:1974-1982 — all 19 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 12) raspiCamSrv/config.py:881— raspiCamSrv/config.py:881-889 | raspiCamSrv/config.py:1068-1076 | raspiCamSrv/config.py:1126-1134 | raspiCamSrv/config.py:1203-1211 | raspiCamSrv/config.py:1370-1378 | raspiCamSrv/config.py:1427-1435 | raspiCamSrv/config.py:1501-1509 | raspiCamSrv/config.py:1599-1607 | raspiCamSrv/config.py:1656-1664 | raspiCamSrv/config.py:1730-1738 | raspiCamSrv/config.py:1890-1898 | raspiCamSrv/config.py:1947-1955 — all 12 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 5) raspiCamSrv/camCfg.py:8301— raspiCamSrv/camCfg.py:8301-8307 | raspiCamSrv/camCfg.py:8341-8347 | raspiCamSrv/camCfg.py:8353-8359 | raspiCamSrv/camCfg.py:8365-8371 | raspiCamSrv/camCfg.py:8377-8383 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) raspiCamSrv/api.py:166— raspiCamSrv/api.py:166-172 | raspiCamSrv/api.py:190-196 | raspiCamSrv/api.py:214-220 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 9) raspiCamSrv/home.py:298— raspiCamSrv/home.py:298-303 | raspiCamSrv/home.py:358-363 | raspiCamSrv/home.py:444-449 | raspiCamSrv/home.py:489-494 | raspiCamSrv/home.py:528-533 | raspiCamSrv/home.py:573-578 | raspiCamSrv/home.py:621-626 | raspiCamSrv/home.py:660-665 | raspiCamSrv/home.py:699-704 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 3) raspiCamSrv/triggerHandler.py:1647— raspiCamSrv/triggerHandler.py:1647-1652 | raspiCamSrv/triggerHandler.py:1685-1690 | raspiCamSrv/triggerHandler.py:1723-1728 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Recommendation — 5 finding(s)
D11 · Test Reliability· Test reliability not included · ×1
Test reliability not included — No test suite was found, so reliability couldn't be assessed.
D16 · Bus Factor· Small-team knowledge concentration · ×1
Small-team knowledge concentration — 15 file(s) are concentrated to one author — the ambient state with 2 active author(s), not 15 separate risks. The signal becomes meaningful as ownership spreads; no per-file action implied now.
D19 · Documentation Quality· The document begins with a 'To get started' list that links to the User Guide, but no steps follow for updating when running Docker (the SetupDocker.md path is referenced), and there is no mention of rollback or reconfiguration after an update. · ×1
The document begins with a 'To get started' list that links to the User Guide, but no steps follow for updating when running Docker (the SetupDocker.md path is referenced), and there is no mention of rollback or reconfiguration after an update. docs/updating_raspiCamSrv.md— Add a brief rollback note under step 6 ('Restart the service') indicating how to revert to the previous version.
Low IaC: DS-0026 Dockerfile— No HEALTHCHECK defined Without one the runtime only knows whether the process is alive, not whether it is serving, so a wedged container is restarted by nobody. The step: add a `HEALTHCHECK` to the image that probes the service the way a client would — this image already declares `EXPOSE 5000`, so a request to `localhost:5000` on the service's own health or root route, exiting non-zero when it does not answer, is the probe — and give it an `--interval`, a `--timeout` and a `--start-period` long enough to cover startup. If the image ships no HTTP client, probe with whatever the runtime already has, or declare the check in the orchestrator instead and say so here.
No tests found — No test suite could be collected — nothing here references a test framework (pytest or unittest), so there were no discoverable tests to count. Tests written as plain executables or shell/PowerShell harnesses are not collectible this way and are not scored here.
Info — 2 finding(s)
D12 · Dependency Hygiene· Dependency hygiene not measured · ×1
Dependency hygiene not measured — dependency manifest found but not parsed for hygiene — This repository's dependency manifest (a Python pyproject.toml/requirements.txt (pip/uv/Poetry)) was found, but this pass cannot parse it for hygiene, so no package was assessed. Zero packages read is NOT a clean dependency tree, so this is NOT SCORED — a gap in the analyzer, not a verdict about this repository. This row is about dependency HYGIENE — outdated, deprecated or unmaintained direct dependencies; known CVEs in the same dependency graph are a separate question, reported under D38 wherever the manifest is OSV-readable.
D22 · Internal API Consistency· No exposed public API · ×1
No exposed public API — No intentionally-exposed types (IsPackable or .Contracts) to evaluate.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No JS/npm manifest or lockfile found outside build output (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); no JS dependencies to scan.
provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .gitlab-ci.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, Jenkinsfile, .circleci); there is no build to attest provenance for.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
0
—
Run 019fcf32-2477-74c0-bde0-2aa5c9074a3f · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 6 · Warnings: 521 · Recommendations: 5 · Info: 2 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 04-08-2026 @ 23:53 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.