Public report of ytdl-org/youtube-dl, published 11 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.2). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 11 November 2026, 03:10 UTC · Survey ID cd_0b0c098a97cf48119047ccb193796317

ytdl-org/youtube-dl

Measured 11 November 2026, 03:09 UTC, at code version bc069d2

CAI score 40out of 100 Weak
CriticalWeakAdequateStrongExemplary
Up 1 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A large codebase: 142,208 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 0.9 person-years · Weakest lens: Security and Compliance, 30

Findings by how serious they are

97 critical 664 serious 647 minor

21 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
11 November 2026, 03:09 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

40of 40 dimensions measured by tools.
1396of 1408 findings point to an exact file and line, so you can open each one in the code. The other 12 concern the repository as a whole, such as missing documentation.
40dimensions across 5 lenses, read from 142,208 lines of product code in 1 project.
Chapters

Executive summary

ytdl-org/youtube-dl falls short of our standard for production because it has passwords or keys in the code's history and pipeline tools referenced by a changeable name. It scores 40 out of 100 and is rated Weak, and all 97 of its critical findings are security problems.

Security and Compliance, at 30, is the weakest lens and counts most in the score. The best first step for the work it takes is recording design decisions, worth about 5 points. Replacing the 29 exposed passwords or keys and switching the old ones off comes next, worth about 10 points. Raising Security and Compliance to 70 would lift the score to about 49.

Fifty-four passwords or keys in the code's history and 29 in the code are open to anyone who can read the repository. Eight pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and two pipeline steps run downloads nobody checks. Replacing each exposed password or key, pinning each tool to an exact version and checking each download against a checksum would close these risks. The two places where the code runs text as code or as a command need a direct call instead. The pipeline step that installs packages without pinning their versions needs the packages it installs pinned to exact versions.

The product code is 142,208 lines, about €130,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Security and Compliance 30 · counts for 47%Production Readiness 33 · counts for 26%Maturity 49 · counts for 14%Code Health 73 · counts for 8%Architecture 100 · counts for 4%

If Security and Compliance rose from 30 to 70, the lowest score rated Strong, the score would rise from 40 to about 49.

Code composition: what the lines of code are
Product code 95%Tests 5%
New since the last survey: 1 finding

This critical or serious finding wasn't in the previous survey, on 23 October 2026.

We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 8 findings

These 8 critical or serious findings were in the previous survey, on 23 October 2026, and are gone from this one.

  • REDACTED Scanning · Leaked secret: REDACTED youtube_dl/extractor/canvas.py
  • REDACTED Scanning · Leaked secret: REDACTED REDACTED
  • Churn × Complexity Hotspots · Hotspot: REDACTED REDACTED
  • Secrets (history) · REDACTED: algolia-api-key REDACTED
  • Secrets (history) · REDACTED: REDACTED youtube_dl/extractor/canvas.py
  • Secrets (history) · REDACTED: REDACTED youtube_dl/extractor/medialaan.py
  • Secrets (history) · REDACTED: REDACTED REDACTED
  • Secrets (history) · REDACTED: REDACTED REDACTED
Rebuild cost: about €130,000 · Estimate
Cost to rebuild€43,000 to €210,000, for 709 to 2,249 hours of work, about 0.9 person-years for 1 to 2 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 40. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 142,208 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Raises the score by about 5 points · Low effort · ADR Quality
2
Resolve the 29 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (4), REDACTED (3), REDACTED (2).
Raises the score by about 10 points · Medium effort · REDACTED Scanning
3
Resolve the 53 REDACTED finding(s) in Secrets (history) — start with REDACTED (10), REDACTED (4), REDACTED (2).
Raises the score by about 6 points · Medium effort · Secrets (history)

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €130,000 to build again, about 0.9 person-years of work. Its weakest lens is Security and Compliance, at 30 (Weak). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.0 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 11% on every change. The history of the code shows how much it changes: about 239 lines over the last 90 days, which is about 969 lines a year. At that pace, the extra work comes to an estimated 0.1 to 0.7 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

843 modules, with 410 dependencies between them. Every module uses only modules listed above it, so there are no loops.

The table shows the 40 modules with the most connections; 803 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 downloader.common2 extractor.common3 extractor.mtv4 extractor.once5 extractor.theplatform6 extractor.turner7 downloader.external8 downloader.http9 downloader.niconico10 downloader.rtmp11 downloader.rtsp12 extractor.abc13 extractor.abcotvs14 extractor.adobepass15 extractor.amp16 extractor.anvato17 extractor.arkena18 extractor.bokecc19 extractor.cbs20 extractor.cnn21 extractor.crunchyroll22 extractor.discoverygo23 extractor.dplay24 extractor.espn25 extractor.gigya26 extractor.hbo27 extractor.keezmovies28 downloader.fragment29 extractor.abcnews30 extractor.bleacherreport31 extractor.brightcove32 extractor.canvas33 extractor.cbsnews34 extractor.foxnews35 extractor.lcp36 extractor.mofosex37 downloader.dash38 downloader.f4m39 downloader.hls40 downloader.ism
1 downloader.common
2 extractor.common
3 extractor.mtv
4 extractor.once
5 extractor.theplatform
6 extractor.turner
7 downloader.external1
8 downloader.http1
9 downloader.niconico1
10 downloader.rtmp1
11 downloader.rtsp1
12 extractor.abc2
13 extractor.abcotvs2
14 extractor.adobepass1
15 extractor.amp1
16 extractor.anvato1
17 extractor.arkena1
18 extractor.bokecc1
19 extractor.cbs1
20 extractor.cnn21
21 extractor.crunchyroll1
22 extractor.discoverygo1
23 extractor.dplay1
24 extractor.espn21
25 extractor.gigya1
26 extractor.hbo1
27 extractor.keezmovies1
28 downloader.fragment11
29 extractor.abcnews11
30 extractor.bleacherreport11
31 extractor.brightcove11
32 extractor.canvas31
33 extractor.cbsnews12
34 extractor.foxnews11
35 extractor.lcp11
36 extractor.mofosex11
37 downloader.dash1
38 downloader.f4m1
39 downloader.hls1
40 downloader.ism1
Uses a module listed above itPart of a loopThe module itself
1 downloader.common2 extractor.common3 extractor.mtv4 extractor.once5 extractor.theplatform6 extractor.turner7 downloader.external8 downloader.http9 downloader.niconico10 downloader.rtmp11 downloader.rtsp12 extractor.abc13 extractor.abcotvs14 extractor.adobepass15 extractor.amp16 extractor.anvato17 extractor.arkena18 extractor.bokecc19 extractor.cbs20 extractor.cnn21 extractor.crunchyroll22 extractor.discoverygo23 extractor.dplay24 extractor.espn25 extractor.gigya26 extractor.hbo27 extractor.keezmovies28 downloader.fragment29 extractor.abcnews30 extractor.bleacherreport31 extractor.brightcove32 extractor.canvas33 extractor.cbsnews34 extractor.foxnews35 extractor.lcp36 extractor.mofosex37 downloader.dash38 downloader.f4m39 downloader.hls40 downloader.ismdownloader.common1extractor.common2extractor.mtv3extractor.once4extractor.theplatform5extractor.turner6downloader.external7downloader.http8downloader.niconico9downloader.rtmp10downloader.rtsp11extractor.abc12extractor.abcotvs13extractor.adobepass14extractor.amp15extractor.anvato16extractor.arkena17extractor.bokecc18extractor.cbs19extractor.cnn20extractor.crunchyroll21extractor.discoverygo22extractor.dplay23extractor.espn24extractor.gigya25extractor.hbo26extractor.keezmovies27downloader.fragment28extractor.abcnews29extractor.bleacherreport30extractor.brightcove31extractor.canvas32extractor.cbsnews33extractor.foxnews34extractor.lcp35extractor.mofosex36downloader.dash37downloader.f4m38downloader.hls39downloader.ism40111112211111121111211111111111131121111111111+803 more modules (most-connected shown)

At a glance — Code Health · 73% · Adequate · gated by D1, D2 ·

At a glance — Architecture · 100% · Exemplary ·

At a glance — Maturity · 49% · Weak · gated by D34, M2 ·

At a glance — Readiness · 33% · Weak · gated by D13, P2, P3 ·

At a glance — Security · 30% · Weak · gated by D28, D29, D36 ·

Security & Compliance — OWASP Top-10 mapping

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 categoryFindingsSeverity
A07:2025 — Authentication Failures86High / Critical
A05:2025 — Injection53High / Critical
A03:2025 — Software Supply Chain Failures5Medium
A01:2025 — Broken Access Control1Medium

Roadmap

Top priorities: Resolve the 29 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (4), REDACTED (3), REDACTED (2); Resolve the 53 REDACTED finding(s) in Secrets (history) — start with REDACTED (10), REDACTED (4), REDACTED (2); Resolve the 1 No ADRs found finding(s) in ADR Quality.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Resolve the 1 No ADRs found finding(s) in ADR Quality.+5.5 ptsLowADR Quality
Resolve the 29 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (4), REDACTED (3), REDACTED (2).+9.7 ptsMediumREDACTED Scanning
Resolve the 53 REDACTED finding(s) in Secrets (history) — start with REDACTED (10), REDACTED (4), REDACTED (2).+6.3 ptsMediumSecrets (history)
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.+4.2 ptsMediumObservability
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.+4.2 ptsMediumSecurity & performance tooling
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+4.0 ptsMediumArchitecture documentation
Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED.+2.0 ptsLowSecrets (history)
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2).+2.0 ptsLowStatic Analysis (SAST)

File quality

Per-file score 0–10 — a quality signature. Of 290 files carrying findings, judged against the Production bar: 6% slop · 58% mixed · 36% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED0.0SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED0.0SlopSecrets (history): REDACTED: REDACTED
REDACTED0.0SlopSecrets (history): REDACTED: REDACTED
REDACTED0.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED0.4SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED0.6SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED0.8SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED0.8SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED1.0SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED1.1SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED2.1SlopSecrets (history): REDACTED: REDACTED
REDACTED2.2SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED2.2SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED2.6SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED3.0SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED3.0SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 97

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 664

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 647

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 21

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey 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. All 40 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, the weighted average across measured dimensions.

Every figure here is one of two 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. 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.

What we checked — 40 dimensions across the health lenses
D1D2D3D4D6D9D13D15D16D17D19D20D27D28D29D32D34D35D36AX10AX3AX4M1M2M3P1P10P2P3P6X12X13X14X19X24X25X27X28X3X30

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
  1. 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, 1396 of 1408 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.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. 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.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1c894-fd73-794c-b074-0a62ead52b4e.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

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.

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.py) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.py) and this repository declares a Python test suite (repository root, 32 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. No dependency manifest this pass reads for hygiene (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems)) was found in this repository, 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 D30 wherever the manifest is OSV-readable.
  • D14 License Compliance — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — no dependency manifest this pass reads for licence data (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems)) was found in this repository, so it declares no third-party dependency closure to grade. A gap in the analyzer, NOT a finding that this repository's licences are compliant: a manifest in an ecosystem outside that list, or third-party code copied into the tree, is not read — so this dimension asserts nothing about this repository's licensing in either direction.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `(repository root)` (142208 LoC, 1618 module-visible types across 7 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
  • D44 Platform End-of-Life — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
  • AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P5 DR & Backup — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found. Whether there is anything here to recover could NOT be determined: persistence is detected from deployment/container manifests and from dependency manifests, and neither was readable by this pass, so a data store this code opens directly — a file, an embedded database — would not be visible to it. The blindness is this analyzer's, not a finding that the repository holds no data. You can widen what we reach: keep the deployment/container manifest or a dependency manifest in this repository — or a link to the ops repo that holds the DR evidence — so the persistence probe has something to read.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript (Vue and Svelte components included), Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X6 Hand-rolled structured-format parsing — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 11 further occurrence(s) are not listed individually; the score already reflects all 51.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do 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 — an in-process token-stream comparison over sliding windows, with type-aware normalization — so 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.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • 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 REDACTED Scanning: REDACTED 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.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • 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").
  • D32 Data Compliance (PII/GDPR): PII/GDPR signals are heuristic pattern matches in code — they flag likely handling concerns, not legal compliance, and cannot trace where data actually flows at runtime.
  • 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.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • 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.

Dimensions

D1 · Cyclomatic Complexity2.0 / 10Critical✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 2.0 / 10 · rule-coverage 100% · ceiling Prevented

152 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was GenericIE._real_extract at 227.

GenericIE._real_extract (cyclomatic 227)youtube_dl/extractor/generic.py:2529
YoutubeIE._real_extract (cyclomatic 187)REDACTED:2362
youtube_dl._real_main (cyclomatic 121)youtube_dl/__init__.py:49
JSInterpreter.interpret_statement (cyclomatic 121)youtube_dl/jsinterp.py:832
BBCIE._real_extract (cyclomatic 97)youtube_dl/extractor/bbc.py:897

+ 147 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 5 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with GenericIE._real_extract (cyclomatic 227), YoutubeIE._real_extract (cyclomatic 187), youtube_dl._real_main (cyclomatic 121). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 5 together lifts Cyclomatic Complexity from 2.0 to about 5.0/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity2.0 / 10Critical✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 2.0 / 10 · rule-coverage 100% · ceiling Prevented

289 method(s) exceeded the cognitive complexity threshold of 15; the worst was YoutubeIE._real_extract at 382.

YoutubeIE._real_extract (cognitive 382)REDACTED:2362
GenericIE._real_extract (cognitive 287)youtube_dl/extractor/generic.py:2529
JSInterpreter.interpret_statement (cognitive 226)youtube_dl/jsinterp.py:832
BBCIE._real_extract (cognitive 207)youtube_dl/extractor/bbc.py:897
youtube_dl._real_main (cognitive 164)youtube_dl/__init__.py:49

+ 284 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 28 bodies over 60 down to 60 or less in Cognitive Complexity — start with YoutubeIE._real_extract (cognitive 382), GenericIE._real_extract (cognitive 287), JSInterpreter.interpret_statement (cognitive 226). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 28 together lifts Cognitive Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes9.4 / 10Stronggated by 19 serious findings✓ 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.

Maturity: Documented → Verified → Prevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Prevented

19 god class(es) detected.

FileTooLong: extractor/generic.py · ×15youtube_dl/extractor/generic.py
TooManyMethods: InfoExtractor · ×4REDACTED:98

What to do

  1. Resolve the 15 FileTooLong finding(s) in God Classes — start with generic.py, REDACTED, REDACTED. — One of this dimension's main actionable groups (15 warning-level).
  2. Resolve the 4 TooManyMethods finding(s) in God Classes — start with REDACTED (2), YoutubeDL.py, REDACTED. — One of this dimension's main actionable groups (4 warning-level).

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication9.8 / 10Stronggated by 57 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Verified

56 duplicated block group(s) detected. One further row reports members as variants of one another; it aggregates block groups already counted above and is not itself counted.

Duplicated block (8 lines × 2) · ×5youtube_dl/downloader/external.py:444
Duplicated block (11 lines × 2) · ×4youtube_dl/extractor/ard.py:84
Duplicated block (14 lines × 2) · ×3REDACTED:531
Duplicated block (7 lines × 2) · ×3youtube_dl/downloader/external.py:159
Duplicated block (5 lines × 2) · ×3youtube_dl/extractor/filmon.py:45

+ 33 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 5 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with external.py, dplay.py, metacafe.py. — One of this dimension's main actionable groups (5 warning-level).
  2. Resolve the 4 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with ard.py, byutv.py, REDACTED. — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 3 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with REDACTED, REDACTED, options.py. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 18 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

D9 · Test Distribution10.0 / 10Exemplary✓ 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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

351 test methods: 351 unit, 0 integration, 0 BDD, 0 e2e. The Python suite contributes 351 test function(s) across 31 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D13 · REDACTED Scanning0.0 / 10Critical✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Prevented

26 secret(s) detected. 1 Algolia API key(s) that the code only sends to Algolia's search endpoints are listed for their ACL to be confirmed and are not counted as leaked: the search-only key is public by design and has the same format as the secret admin key.

REDACTED
REDACTED

What to do

  1. Resolve the 29 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (4), REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (29 issue-level).
  2. Resolve the 1 Algolia API key used for search finding(s) in REDACTED Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.

D15 · Churn × Complexity Hotspots10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

D16 · Bus Factor9.7 / 10Exemplary✓ 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.

Maturity: Documented → Verified → Prevented · effective 9.7 / 10 · rule-coverage 100% · ceiling Documented

8 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is REDACTED. Counted over 274 of the 864 production source files in this repository: 253 are under the ~2,400-byte size floor this dimension measures over, and the remaining 337 have no attributable history left to measure.

Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt9.9 / 10Stronggated by 95 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Prevented

95 deducted task-comment markers across 142208 LoC (0.1/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×78youtube_dl/YoutubeDL.py:1214
XxxComment · ×9youtube_dl/jsinterp.py:980
FixmeComment · ×5REDACTED:2892
HackComment · ×3REDACTED:2503

What to do

  1. Resolve the 78 TodoComment finding(s) in Explicit Debt — start with REDACTED (8), jsinterp.py (6), REDACTED (5). — One of this dimension's main actionable groups (78 warning-level).
  2. Resolve the 9 XxxComment finding(s) in Explicit Debt — start with mediasite.py (5), jsinterp.py, lecture2go.py. — One of this dimension's main actionable groups (9 warning-level).
  3. Resolve the 5 FixmeComment finding(s) in Explicit Debt — start with REDACTED (3), jsinterp.py, generic.py. — One of this dimension's main actionable groups (5 warning-level).

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 1 documentation facets pass in full. 5 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D27 · Navigability10.0 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

78 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)0.0 / 10Critical✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

55 finding(s): 0 critical, 54 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 53 REDACTED finding(s) in Secrets (history) — start with REDACTED (10), REDACTED (4), REDACTED (2). — One of this dimension's main actionable groups (53 issue-level).
  2. Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 1 Algolia API key used for search finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)0.5 / 10Critical✓ Tool-verified

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).

Maturity: Documented → Verified → Prevented · effective 0.5 / 10 · rule-coverage 100% · ceiling Documented

53 finding(s): 0 critical, 14 high, 38 medium, 1 low. 8 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 1 file(s) — `REDACTED` — so no absence of findings in them is evidence of anything, and nothing in them was analysed. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 8 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
  3. No action in Static Analysis (SAST) — all 8 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (8 issue-level, 0 of them charged here).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D32 · Data Compliance (PII/GDPR)9.0 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Likely personal-data (PII / GDPR) handling concerns — logging or storing data without safeguards.

Method: Heuristic PII/GDPR LEAK scan via semgrep across the repo, using our own ruleset: personal data crossing a boundary it should not — reaching a log/console sink, a URL or query string, or unprotected browser storage. Matches map to severity and a 0-10 wide normalizer. A clean sweep is unscored rather than an unearned 10, and is a statement about the leak paths checked only — this dimension does not inventory the personal data a repository holds (the personal-data map and the C1-C5 compliance cards do that), so it never reports that a repository has no personal-data surface. Reported LOUDLY as a measurement gap if the ruleset is missing from the analyzer image. Exhaustive over the leak paths, advisory-leaning; degrades on parse failure.

Maturity: Documented → Verified → Prevented · effective 9.0 / 10 · rule-coverage 100% · ceiling Documented

1 finding(s): 0 critical, 0 high, 1 medium, 0 low.

REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d32_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness0.7 / 10Critical✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 0.7 / 10 · rule-coverage 100% · ceiling Documented

571 of 611 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is youtube_dl/extractor/generic.py. Counted over 611 of the 864 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×568youtube_dl/extractor/adobepass.py:1
Most significant orphaned file · ×3youtube_dl/extractor/generic.py:1
Concentrated knowledge decay

What to do

  1. Resolve the 568 Orphaned file finding(s) in Knowledge Freshness — start with adobepass.py, pbs.py, REDACTED. — One of this dimension's main actionable groups (568 recommendation-level).
  2. Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with generic.py, bbc.py, vimeo.py. — One of this dimension's main actionable groups (3 recommendation-level).
  3. Resolve the 1 Concentrated knowledge decay finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling10.0 / 10Exemplary✓ Tool-verified

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. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

Maturity: Documented → Verified → Prevented · effective 2.5 / 10 · rule-coverage 100% · ceiling Documented

1/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

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 an 'Architecture' / 'How it works' section to the root README — the high-level shape.
M2 · Architecture documentation0.0 / 10Critical✓ Tool-verified

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 numbered `NNNN-title` documents in any markup this check reads, 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.
  • No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
  • Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability0.0 / 10Critical✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.

What to do

  • Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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 as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:23

What to do

  • Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X3 · Exception handling7.3 / 10Strong✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×5) — youtube_dl/YoutubeDL.py:2534, youtube_dl/downloader/common.py:234, youtube_dl/downloader/fragment.py:283, …
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `__del__()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch. — REDACTED:3740
  • `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×4) — youtube_dl/jsinterp.py:1444, REDACTED:1805, youtube_dl/extractor/wwe.py:135, …

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

Reference — by lens

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.

LensScoreRatingImpact
Code Health73%Adequate — gated by D1, D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture100%ExemplaryStrongest area.
Maturity49%Weak — gated by D34, M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness33%Weak — gated by D13, P2, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security30%Weak — gated by D28, D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 3 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • X10 Duplicated predicate — 21 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 75 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.

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — Not applicable: this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads.
  • 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 — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
  • 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 — No access-control surface detected in the analyzed source — this repository registers no route and starts no server another machine can reach (no Flask/FastAPI/Starlette route, Django urlpatterns or class-based view, Tornado handler). Access control is therefore N/A here — a library or command-line tool is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or MongoEngine model, a migration or a SQL schema — and no database or data-store client (Django ORM, SQLAlchemy, psycopg, PyMongo, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~8243 lines of test source are present (.py) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the .py suite was found but not re-run
  • D12 Dependency Hygiene — Dependency hygiene not measured — no supported dependency manifest was read
  • D14 License Compliance — No dependency manifest found — no declared dependency closure to grade for licences
  • 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.
  • D21 Naming Consistency — Naming consistency is measured on C# and TypeScript only; Python not measured.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Python surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. 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 — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .py, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, 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), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • 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.
  • D43 Malicious Dependencies — 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), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D5 Coupling — Not applicable — this Python build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
  • 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
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens 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 lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • 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
  • M4 Documentation accuracy — Not applicable: the 5 current-state document(s) make no claim of a kind M4 checks. 2 claim(s) of kinds M4 does not check were not checked (path 2); M4 checks only links and versions and artefact counts.
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Python source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • 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`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for a pytest-benchmark or pytest-codspeed dependency with tests taking the `benchmark` fixture, an asv.conf.json with its `time_`/`mem_`/`peakmem_` benchmarks, or a pyperf Runner, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
  • 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 applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — 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
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern 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 — no C# was loaded; this repository's Python was read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X29 Per-element action decided by a fixed element — 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
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • 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
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

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.

Critical — 97 finding(s)
D28 · Secrets (history) · REDACTED · ×53
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 28 more in this group — see findings.md.
D13 · REDACTED Scanning · Leaked secret · ×29
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 4 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D28 · Secrets (history) · High secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
Serious — 664 finding(s)
D17 · Explicit Debt · TodoComment · ×78
  • TodoComment youtube_dl/YoutubeDL.py:1214 — # TODO: skip failed (empty) entries? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/YoutubeDL.py:1810 — # TODO Central sorting goes here — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/YoutubeDL.py:1961 — # TODO: backward compatibility, to be removed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/YoutubeDL.py:2121 — # TODO: Check acodec/vcodec — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:3294 — # TODO: [Base]ExceptionGroup (3.12+) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/jsinterp.py:268 — # TODO: Symbol, BigInt — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/jsinterp.py:440 — # TODO: execute matches with these flags (remaining: d, y) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/jsinterp.py:553 — # TODO: [MDN] When a segment overflows or underflows its expected — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/jsinterp.py:952 — # TODO: make interpret_statement do this properly, if possible — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/jsinterp.py:1128 — # TODO: handle extreme sparsity without memory bloat, eg using auxiliary dict — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/jsinterp.py:1366 — # TODO: argvals[1] callable, other Py vs JS edge cases — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/swfinterp.py:698 — # TODO warn here — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/traversal.py:3 — # TODO: move these utils.fns here and move import to utils — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:2247 — # TODO: HTML5 allows entities without a semicolon. For example, — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:6178 — # TODO: fallback to CLI tools — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/postprocessor/ffmpeg.py:524 — # TODO: figure out merge-capable ffmpeg version — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/postprocessor/xattrpp.py:21 — # TODO: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/extractor/adobepass.py:1382 — # TODO: eliminate code duplication with generic extractor and move — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/extractor/adobepass.py:1411 — # TODO add support for other TV Providers — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/extractor/applepodcasts.py:64 — # try pre 2021-11 page type: TODO: consider deleting if no longer used — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:44 — # TODO: handle s and e stage_mode (live streams and ended live streams) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/extractor/bbc.py:399 — # TODO: let expected_status be passed into _extract_xxx_formats() instead — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/extractor/bbc.py:859 — # TODO: there are also f4m and m3u8 streams incorporated in playlist.sxml — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:221 — # TODO 'view_count' requires deobfuscating Javascript — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment youtube_dl/extractor/biobiochiletv.py:45 — # TODO: fix url_transparent information overriding — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 53 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED · ×15
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · FileTooLong · ×15
  • FileTooLong: extractor/generic.py youtube_dl/extractor/generic.py — FileTooLong — 2515 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2015 over it, 5.03× the bar. 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: REDACTED REDACTED — FileTooLong — 2476 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1976 over it, 4.95× the bar. 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: REDACTED REDACTED — FileTooLong — 2329 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1829 over it, 4.66× the bar. 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: REDACTED REDACTED — FileTooLong — 1401 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 901 over it, 2.80× the bar. 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: youtube_dl/YoutubeDL.py youtube_dl/YoutubeDL.py — FileTooLong — 1082 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 582 over it, 2.16× the bar. 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: youtube_dl/jsinterp.py youtube_dl/jsinterp.py — FileTooLong — 974 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 474 over it, 1.95× the bar. 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: youtube_dl/options.py youtube_dl/options.py — FileTooLong — 887 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 387 over it, 1.77× the bar. 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: extractor/bbc.py youtube_dl/extractor/bbc.py — FileTooLong — 808 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 308 over it, 1.62× the bar. 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: youtube_dl/swfinterp.py youtube_dl/swfinterp.py — FileTooLong — 733 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 233 over it, 1.47× the bar. 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: extractor/orf.py youtube_dl/extractor/orf.py — FileTooLong — 589 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 89 over it, 1.18× the bar. 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: extractor/peertube.py youtube_dl/extractor/peertube.py — FileTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 28 over it, 1.06× the bar. 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: extractor/twitter.py youtube_dl/extractor/twitter.py — FileTooLong — 526 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 26 over it, 1.05× the bar. 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: youtube_dl/casefold.py youtube_dl/casefold.py — FileTooLong — 522 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 22 over it, 1.04× the bar. 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: postprocessor/ffmpeg.py youtube_dl/postprocessor/ffmpeg.py — FileTooLong — 520 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 20 over it, 1.04× the bar. 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: extractor/npo.py youtube_dl/extractor/npo.py — FileTooLong — 519 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 19 over it, 1.04× the bar. 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.
D17 · Explicit Debt · XxxComment · ×9
  • XxxComment youtube_dl/jsinterp.py:980 — # XXX: This works for now, but makes debugging future issues very hard — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • XxxComment youtube_dl/extractor/lecture2go.py:49 — # XXX: currently broken — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • XxxComment youtube_dl/extractor/mediasite.py:131 — # XXX: add UrlReferrer? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • XxxComment youtube_dl/extractor/mediasite.py:134 — # XXX: might have also extracted UrlReferrer and QueryString from the html — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • XxxComment youtube_dl/extractor/mediasite.py:181 — # XXX: if Stream.get('CanChangeScheme', False), switch scheme to HTTP/HTTPS — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • XxxComment youtube_dl/extractor/mediasite.py:222 — # XXX: Presentation['Presenters'] — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • XxxComment youtube_dl/extractor/mediasite.py:223 — # XXX: Presentation['Transcript'] — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • XxxComment test/test_YoutubeDL.py:350 — # XXX: In real cases InfoExtractor._parse_mpd_formats() fills up 'acodec' — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • XxxComment test/test_http.py:170 — # XXX: Python 3 http server does not allow non-ASCII header values — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D29 · Static Analysis (SAST) · REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X3 · Exception handling · Swallowed exception (empty catch) · ×6
  • Swallowed exception (empty catch) youtube_dl/YoutubeDL.py:2534 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:3740 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `__del__()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: narrow the catch to the exception this release can actually raise, and record it through whatever this codebase already uses to report problems — or, if it truly cannot matter, say why in a comment on the catch.
  • Swallowed exception (empty catch) youtube_dl/downloader/common.py:234 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) youtube_dl/downloader/fragment.py:283 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:283 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) devscripts/make_lazy_extractors.py:130 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D17 · Explicit Debt · FixmeComment · ×5
  • FixmeComment REDACTED:2892 — # FIXME: raise error if .. is applied at toplevel? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment REDACTED:2975 — # FIXME: what if the selector is "*" ? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment REDACTED:3006 — # implicit all (FIXME: keep this?) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment youtube_dl/jsinterp.py:1013 — # FIXME — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment youtube_dl/extractor/generic.py:2710 — # FIXME: unescaping the whole page may break URLs, commenting out for now. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×5
  • Duplicated block (8 lines × 2) youtube_dl/downloader/external.py:444 — youtube_dl/downloader/external.py:444-451 | youtube_dl/downloader/rtmp.py:101-108 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) youtube_dl/extractor/dplay.py:228 — youtube_dl/extractor/dplay.py:228-235 | youtube_dl/extractor/npo.py:230-237 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/dplay.py:228` 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 (8 lines × 2) youtube_dl/extractor/metacafe.py:236 — youtube_dl/extractor/metacafe.py:236-243 | youtube_dl/extractor/nobelprize.py:38-45 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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 (8 lines × 2) youtube_dl/extractor/redtube.py:90 — youtube_dl/extractor/redtube.py:90-98 | youtube_dl/extractor/udemy.py:290-297 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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 (8 lines × 2) youtube_dl/extractor/tudou.py:20 — youtube_dl/extractor/tudou.py:20-27 | youtube_dl/extractor/tudou.py:42-49 — 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 `youtube_dl/extractor/tudou.py:20` 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.
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · TooManyMethods · ×4
  • TooManyMethods: InfoExtractor REDACTED:98 — TooManyMethods — 124 methods. The bar is 30 methods; this is 94 over it, 4.13× the bar. 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: YoutubeDL youtube_dl/YoutubeDL.py:148 — TooManyMethods — 67 methods. The bar is 30 methods; this is 37 over it, 2.23× the bar. 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: FileDownloader youtube_dl/downloader/common.py:21 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. 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: YoutubeIE REDACTED:701 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. 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.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×4
  • Duplicated block (11 lines × 2) youtube_dl/extractor/ard.py:84 — youtube_dl/extractor/ard.py:84-94 | youtube_dl/extractor/tvplay.py:265-275 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) youtube_dl/extractor/byutv.py:87 — youtube_dl/extractor/byutv.py:87-97 | youtube_dl/extractor/crackle.py:107-117 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/byutv.py:87` 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 × 2) REDACTED:4867 — REDACTED:4867-4887 | REDACTED:4919-4929 — 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 `REDACTED:4867` 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 (11 lines × 2) youtube_dl/extractor/howcast.py:28 — youtube_dl/extractor/howcast.py:28-43 | youtube_dl/extractor/rottentomatoes.py:22-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/howcast.py:28` 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. 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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×4
  • Swallowed exception (caught, then discarded) youtube_dl/jsinterp.py:1444 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:1805 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) youtube_dl/extractor/wwe.py:135 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) youtube_dl/downloader/fragment.py:81 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D17 · Explicit Debt · HackComment · ×3
  • HackComment REDACTED:2503 — # HACK: The following are the correct unquote_to_bytes, unquote and unquote_plus — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment REDACTED:2585 — # HACK: The following is the correct parse_qs implementation from cpython 3's stdlib. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment REDACTED:3106 — # HACK: The default implementations of os.path.expanduser from cpython do not decode — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×3
  • Duplicated block (14 lines × 2) REDACTED:531 — REDACTED:531-544 | REDACTED:552-565 — 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 `REDACTED:531` 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 (14 lines × 2) REDACTED:3834 — REDACTED:3834-3847 | REDACTED:3949-3962 — 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 (14 lines × 2) youtube_dl/options.py:146 — youtube_dl/options.py:146-159 | youtube_dl/options.py:759-772 — 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 `youtube_dl/options.py:146` 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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×3
  • Duplicated block (7 lines × 2) youtube_dl/downloader/external.py:159 — youtube_dl/downloader/external.py:159-165 | youtube_dl/downloader/external.py:208-214 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `youtube_dl/downloader/external.py:156` calls `_bool_option`, `_valueless_option` and `youtube_dl/downloader/external.py:207` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) REDACTED:318 — REDACTED:318-324 | REDACTED:371-379 — 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 `REDACTED:371` 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 (7 lines × 2) youtube_dl/extractor/maoritv.py:25 — youtube_dl/extractor/maoritv.py:25-31 | youtube_dl/extractor/thestar.py:29-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/maoritv.py:25` 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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×3
  • Duplicated block (5 lines × 2) youtube_dl/extractor/filmon.py:45 — youtube_dl/extractor/filmon.py:45-49 | youtube_dl/extractor/filmon.py:130-134 — 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) youtube_dl/extractor/imggaming.py:57 — youtube_dl/extractor/imggaming.py:57-62 | youtube_dl/extractor/sevenplus.py:59-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) REDACTED:407 — REDACTED:407-411 | REDACTED:436-440 — 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.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (12–15 lines × 2) · ×2
  • Duplicated block (12–15 lines × 2) youtube_dl/extractor/dplay.py:232 — youtube_dl/extractor/dplay.py:232-243 | youtube_dl/extractor/generic.py:3573-3587 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (12–15 lines × 2) youtube_dl/extractor/limelight.py:166 — youtube_dl/extractor/limelight.py:166-180 | youtube_dl/extractor/theweatherchannel.py:75-86 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×2
  • Duplicated block (12 lines × 2) youtube_dl/YoutubeDL.py:1464 — youtube_dl/YoutubeDL.py:1464-1475 | youtube_dl/YoutubeDL.py:1476-1487 — 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 `youtube_dl/YoutubeDL.py:1464` 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) youtube_dl/downloader/dash.py:22 — youtube_dl/downloader/dash.py:22-33 | youtube_dl/downloader/ism.py:214-225 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×2
  • Duplicated block (11 lines × 4) youtube_dl/options.py:184 — youtube_dl/options.py:184-195 | youtube_dl/options.py:635-645 | youtube_dl/options.py:660-670 | youtube_dl/options.py:766-776 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/options.py:184` 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 (11 lines × 4) youtube_dl/options.py:439 — youtube_dl/options.py:439-449 | youtube_dl/options.py:612-622 | youtube_dl/options.py:644-654 | youtube_dl/options.py:669-679 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/options.py:439` 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.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×2
  • Duplicated block (11 lines × 3) youtube_dl/options.py:145 — youtube_dl/options.py:145-155 | youtube_dl/options.py:746-756 | youtube_dl/options.py:758-768 — 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 `youtube_dl/options.py:145` 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 (11 lines × 3) youtube_dl/options.py:480 — youtube_dl/options.py:480-490 | youtube_dl/options.py:745-755 | youtube_dl/options.py:757-767 — 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 `youtube_dl/options.py:480` 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×2
  • Duplicated block (10 lines × 2) youtube_dl/YoutubeDL.py:1244 — youtube_dl/YoutubeDL.py:1244-1253 | REDACTED:4905-4914 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) youtube_dl/extractor/npo.py:607 — youtube_dl/extractor/npo.py:607-616 | youtube_dl/extractor/spiegel.py:42-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/npo.py:607` 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.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×2
  • Duplicated block (9 lines × 2) youtube_dl/extractor/atresplayer.py:90 — youtube_dl/extractor/atresplayer.py:90-98 | youtube_dl/extractor/swrmediathek.py:78-86 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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 (9 lines × 2) youtube_dl/swfinterp.py:701 — youtube_dl/swfinterp.py:701-709 | youtube_dl/swfinterp.py:740-748 — 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 `youtube_dl/swfinterp.py:701` 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.
D1 · Cyclomatic Complexity · GenericIE._real_extract (cyclomatic 227) · ×1
  • GenericIE._real_extract (cyclomatic 227) youtube_dl/extractor/generic.py:2529 — GenericIE._real_extract has cyclomatic complexity 227 (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.
D1 · Cyclomatic Complexity · YoutubeIE._real_extract (cyclomatic 187) · ×1
  • YoutubeIE._real_extract (cyclomatic 187) REDACTED:2362 — YoutubeIE._real_extract has cyclomatic complexity 187 (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.
D1 · Cyclomatic Complexity · youtube_dl._real_main (cyclomatic 121) · ×1
  • youtube_dl._real_main (cyclomatic 121) youtube_dl/__init__.py:49 — youtube_dl._real_main has cyclomatic complexity 121 (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.
D1 · Cyclomatic Complexity · JSInterpreter.interpret_statement (cyclomatic 121) · ×1
  • JSInterpreter.interpret_statement (cyclomatic 121) youtube_dl/jsinterp.py:832 — JSInterpreter.interpret_statement has cyclomatic complexity 121 (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.
D1 · Cyclomatic Complexity · BBCIE._real_extract (cyclomatic 97) · ×1
  • BBCIE._real_extract (cyclomatic 97) youtube_dl/extractor/bbc.py:897 — BBCIE._real_extract has cyclomatic complexity 97 (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.
D1 · Cyclomatic Complexity · YoutubeDL.process_info (cyclomatic 60) · ×1
  • YoutubeDL.process_info (cyclomatic 60) youtube_dl/YoutubeDL.py:1952 — YoutubeDL.process_info has cyclomatic complexity 60 (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.
D1 · Cyclomatic Complexity · FacebookIE._extract_from_url (cyclomatic 57) · ×1
  • FacebookIE._extract_from_url (cyclomatic 57) youtube_dl/extractor/facebook.py:380 — FacebookIE._extract_from_url has cyclomatic complexity 57 (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.
D1 · Cyclomatic Complexity · InfoExtractor._parse_mpd_formats_and_subtitles (cyclomatic 55) · ×1
  • InfoExtractor._parse_mpd_formats_and_subtitles (cyclomatic 55) REDACTED:2295 — InfoExtractor._parse_mpd_formats_and_subtitles 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.
D1 · Cyclomatic Complexity · NiconicoIE._real_extract (cyclomatic 53) · ×1
  • NiconicoIE._real_extract (cyclomatic 53) REDACTED:381 — NiconicoIE._real_extract has cyclomatic complexity 53 (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.
D1 · Cyclomatic Complexity · YoutubeTabIE._entries (cyclomatic 53) · ×1
  • YoutubeTabIE._entries (cyclomatic 53) REDACTED:3822 — YoutubeTabIE._entries has cyclomatic complexity 53 (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.
D1 · Cyclomatic Complexity · YoutubeDL.process_video_result (cyclomatic 52) · ×1
  • YoutubeDL.process_video_result (cyclomatic 52) youtube_dl/YoutubeDL.py:1645 — YoutubeDL.process_video_result has cyclomatic complexity 52 (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.
D1 · Cyclomatic Complexity · XHamsterIE._real_extract (cyclomatic 48) · ×1
  • XHamsterIE._real_extract (cyclomatic 48) youtube_dl/extractor/xhamster.py:131 — XHamsterIE._real_extract 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.
D1 · Cyclomatic Complexity · HlsFD.real_download (cyclomatic 43) · ×1
  • HlsFD.real_download (cyclomatic 43) youtube_dl/downloader/hls.py:60 — HlsFD.real_download has cyclomatic complexity 43 (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.
D1 · Cyclomatic Complexity · CrunchyrollIE._real_extract (cyclomatic 42) · ×1
  • CrunchyrollIE._real_extract (cyclomatic 42) REDACTED:414 — CrunchyrollIE._real_extract has cyclomatic complexity 42 (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.
D1 · Cyclomatic Complexity · JSInterpreter._separate (cyclomatic 42) · ×1
  • JSInterpreter._separate (cyclomatic 42) youtube_dl/jsinterp.py:625 — JSInterpreter._separate has cyclomatic complexity 42 (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.
D1 · Cyclomatic Complexity · UdemyIE._real_extract (cyclomatic 39) · ×1
  • UdemyIE._real_extract (cyclomatic 39) youtube_dl/extractor/udemy.py:214 — UdemyIE._real_extract has cyclomatic complexity 39 (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.
D1 · Cyclomatic Complexity · DRTVIE._real_extract (cyclomatic 38) · ×1
  • DRTVIE._real_extract (cyclomatic 38) youtube_dl/extractor/drtv.py:119 — DRTVIE._real_extract 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.
D1 · Cyclomatic Complexity · NRKIE._real_extract (cyclomatic 38) · ×1
  • NRKIE._real_extract (cyclomatic 38) youtube_dl/extractor/nrk.py:146 — NRKIE._real_extract 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.
D1 · Cyclomatic Complexity · TEDIE._talk_info (cyclomatic 38) · ×1
  • TEDIE._talk_info (cyclomatic 38) youtube_dl/extractor/ted.py:179 — TEDIE._talk_info 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.
D1 · Cyclomatic Complexity · BrightcoveNewIE._parse_brightcove_metadata (cyclomatic 36) · ×1
  • BrightcoveNewIE._parse_brightcove_metadata (cyclomatic 36) youtube_dl/extractor/brightcove.py:471 — BrightcoveNewIE._parse_brightcove_metadata has cyclomatic complexity 36 (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.
D1 · Cyclomatic Complexity · CeskaTelevizeIE._real_extract (cyclomatic 36) · ×1
  • CeskaTelevizeIE._real_extract (cyclomatic 36) youtube_dl/extractor/ceskatelevize.py:107 — CeskaTelevizeIE._real_extract has cyclomatic complexity 36 (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.
D1 · Cyclomatic Complexity · VimeoBaseInfoExtractor._parse_config (cyclomatic 36) · ×1
  • VimeoBaseInfoExtractor._parse_config (cyclomatic 36) youtube_dl/extractor/vimeo.py:123 — VimeoBaseInfoExtractor._parse_config has cyclomatic complexity 36 (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.
D1 · Cyclomatic Complexity · FFmpegFD._call_downloader (cyclomatic 35) · ×1
  • FFmpegFD._call_downloader (cyclomatic 35) youtube_dl/downloader/external.py:373 — FFmpegFD._call_downloader has cyclomatic complexity 35 (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.
D1 · Cyclomatic Complexity · PuhuTVIE._real_extract (cyclomatic 35) · ×1
  • PuhuTVIE._real_extract (cyclomatic 35) youtube_dl/extractor/puhutv.py:59 — PuhuTVIE._real_extract has cyclomatic complexity 35 (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.
D1 · Cyclomatic Complexity · SoundcloudIE._extract_info_dict (cyclomatic 35) · ×1
  • SoundcloudIE._extract_info_dict (cyclomatic 35) youtube_dl/extractor/soundcloud.py:318 — SoundcloudIE._extract_info_dict has cyclomatic complexity 35 (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.
D1 · Cyclomatic Complexity · TurnerBaseIE._extract_cvp_info (cyclomatic 35) · ×1
  • TurnerBaseIE._extract_cvp_info (cyclomatic 35) youtube_dl/extractor/turner.py:53 — TurnerBaseIE._extract_cvp_info has cyclomatic complexity 35 (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.
D1 · Cyclomatic Complexity · VimeoIE._real_extract (cyclomatic 35) · ×1
  • VimeoIE._real_extract (cyclomatic 35) youtube_dl/extractor/vimeo.py:635 — VimeoIE._real_extract has cyclomatic complexity 35 (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.
D1 · Cyclomatic Complexity · SWFInterpreter.__init__ (cyclomatic 35) · ×1
  • SWFInterpreter.__init__ (cyclomatic 35) youtube_dl/swfinterp.py:186 — SWFInterpreter.__init__ has cyclomatic complexity 35 (threshold 15). 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.
D1 · Cyclomatic Complexity · KalturaIE._real_extract (cyclomatic 34) · ×1
  • KalturaIE._real_extract (cyclomatic 34) youtube_dl/extractor/kaltura.py:229 — KalturaIE._real_extract 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.
D1 · Cyclomatic Complexity · NPOIE._get_old_info (cyclomatic 33) · ×1
  • NPOIE._get_old_info (cyclomatic 33) youtube_dl/extractor/npo.py:299 — NPOIE._get_old_info has cyclomatic complexity 33 (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.
D1 · Cyclomatic Complexity · RtmpFD.real_download (cyclomatic 32) · ×1
  • RtmpFD.real_download (cyclomatic 32) youtube_dl/downloader/rtmp.py:24 — RtmpFD.real_download has cyclomatic complexity 32 (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.
D1 · Cyclomatic Complexity · ADNIE._real_extract (cyclomatic 31) · ×1
  • ADNIE._real_extract (cyclomatic 31) youtube_dl/extractor/adn.py:165 — ADNIE._real_extract has cyclomatic complexity 31 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · GoIE._real_extract (cyclomatic 31) · ×1
  • GoIE._real_extract (cyclomatic 31) youtube_dl/extractor/go.py:158 — GoIE._real_extract has cyclomatic complexity 31 (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.
D1 · Cyclomatic Complexity · PBSIE._real_extract (cyclomatic 31) · ×1
  • PBSIE._real_extract (cyclomatic 31) youtube_dl/extractor/pbs.py:539 — PBSIE._real_extract has cyclomatic complexity 31 (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.
D1 · Cyclomatic Complexity · PornHubIE._real_extract (cyclomatic 31) · ×1
  • PornHubIE._real_extract (cyclomatic 31) REDACTED:261 — PornHubIE._real_extract has cyclomatic complexity 31 (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.
D1 · Cyclomatic Complexity · RTSIE._real_extract (cyclomatic 31) · ×1
  • RTSIE._real_extract (cyclomatic 31) youtube_dl/extractor/rts.py:118 — RTSIE._real_extract has cyclomatic complexity 31 (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.
D1 · Cyclomatic Complexity · CSpanIE._real_extract (cyclomatic 30) · ×1
  • CSpanIE._real_extract (cyclomatic 30) youtube_dl/extractor/cspan.py:84 — CSpanIE._real_extract 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.
D1 · Cyclomatic Complexity · ThreeQSDNIE._real_extract (cyclomatic 30) · ×1
  • ThreeQSDNIE._real_extract (cyclomatic 30) youtube_dl/extractor/threeqsdn.py:87 — ThreeQSDNIE._real_extract 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.
D1 · Cyclomatic Complexity · VKIE._real_extract (cyclomatic 30) · ×1
  • VKIE._real_extract (cyclomatic 30) youtube_dl/extractor/vk.py:310 — VKIE._real_extract 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.
D1 · Cyclomatic Complexity · InfoExtractor._parse_smil_formats (cyclomatic 29) · ×1
  • InfoExtractor._parse_smil_formats (cyclomatic 29) REDACTED:2095 — InfoExtractor._parse_smil_formats has cyclomatic complexity 29 (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.
D1 · Cyclomatic Complexity · FranceTVIE._extract_video (cyclomatic 28) · ×1
  • FranceTVIE._extract_video (cyclomatic 28) youtube_dl/extractor/francetv.py:89 — FranceTVIE._extract_video 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.
D1 · Cyclomatic Complexity · ProSiebenSat1BaseIE._extract_video_info (cyclomatic 28) · ×1
  • ProSiebenSat1BaseIE._extract_video_info (cyclomatic 28) REDACTED:25 — ProSiebenSat1BaseIE._extract_video_info 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.
D1 · Cyclomatic Complexity · update.update_self (cyclomatic 28) · ×1
  • update.update_self (cyclomatic 28) youtube_dl/update.py:34 — update.update_self 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.
D1 · Cyclomatic Complexity · AdobePassIE._extract_mvpd_auth (cyclomatic 27) · ×1
  • AdobePassIE._extract_mvpd_auth (cyclomatic 27) youtube_dl/extractor/adobepass.py:1354 — AdobePassIE._extract_mvpd_auth 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.
D1 · Cyclomatic Complexity · InfoExtractor._parse_f4m_formats (cyclomatic 27) · ×1
  • InfoExtractor._parse_f4m_formats (cyclomatic 27) REDACTED:1699 — InfoExtractor._parse_f4m_formats 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.
D1 · Cyclomatic Complexity · DailymotionIE._real_extract (cyclomatic 27) · ×1
  • DailymotionIE._real_extract (cyclomatic 27) REDACTED:206 — DailymotionIE._real_extract 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.
D1 · Cyclomatic Complexity · MetacafeIE._real_extract (cyclomatic 27) · ×1
  • MetacafeIE._real_extract (cyclomatic 27) youtube_dl/extractor/metacafe.py:131 — MetacafeIE._real_extract 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.
D1 · Cyclomatic Complexity · TV2IE._real_extract (cyclomatic 27) · ×1
  • TV2IE._real_extract (cyclomatic 27) youtube_dl/extractor/tv2.py:41 — TV2IE._real_extract 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.
D1 · Cyclomatic Complexity · F4mFD.real_download (cyclomatic 26) · ×1
  • F4mFD.real_download (cyclomatic 26) youtube_dl/downloader/f4m.py:319 — F4mFD.real_download 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.
D1 · Cyclomatic Complexity · InfoExtractor._parse_html5_media_entries (cyclomatic 26) · ×1
  • InfoExtractor._parse_html5_media_entries (cyclomatic 26) REDACTED:2785 — InfoExtractor._parse_html5_media_entries 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.
D1 · Cyclomatic Complexity · LimelightBaseIE._extract_info (cyclomatic 26) · ×1
  • LimelightBaseIE._extract_info (cyclomatic 26) youtube_dl/extractor/limelight.py:88 — LimelightBaseIE._extract_info 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.
D1 · Cyclomatic Complexity · TwitterIE._real_extract (cyclomatic 26) · ×1
  • TwitterIE._real_extract (cyclomatic 26) youtube_dl/extractor/twitter.py:432 — TwitterIE._real_extract 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.
D1 · Cyclomatic Complexity · ArcPublishingIE._real_extract (cyclomatic 25) · ×1
  • ArcPublishingIE._real_extract (cyclomatic 25) youtube_dl/extractor/arcpublishing.py:88 — ArcPublishingIE._real_extract 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.
D1 · Cyclomatic Complexity · BandcampIE._real_extract (cyclomatic 25) · ×1
  • BandcampIE._real_extract (cyclomatic 25) youtube_dl/extractor/bandcamp.py:89 — BandcampIE._real_extract 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.
D1 · Cyclomatic Complexity · InfoExtractor._json_ld (cyclomatic 25) · ×1
  • InfoExtractor._json_ld (cyclomatic 25) REDACTED:1355 — InfoExtractor._json_ld 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.
D1 · Cyclomatic Complexity · InfoExtractor._parse_ism_formats (cyclomatic 25) · ×1
  • InfoExtractor._parse_ism_formats (cyclomatic 25) REDACTED:2690 — InfoExtractor._parse_ism_formats 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.
D1 · Cyclomatic Complexity · CrackleIE._real_extract (cyclomatic 25) · ×1
  • CrackleIE._real_extract (cyclomatic 25) youtube_dl/extractor/crackle.py:69 — CrackleIE._real_extract 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.
D1 · Cyclomatic Complexity · HotStarIE._real_extract (cyclomatic 25) · ×1
  • HotStarIE._real_extract (cyclomatic 25) youtube_dl/extractor/hotstar.py:111 — HotStarIE._real_extract 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.
D1 · Cyclomatic Complexity · FFmpegExtractAudioPP.run (cyclomatic 25) · ×1
  • FFmpegExtractAudioPP.run (cyclomatic 25) youtube_dl/postprocessor/ffmpeg.py:265 — FFmpegExtractAudioPP.run 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.
D1 · Cyclomatic Complexity · ArkenaIE._real_extract (cyclomatic 24) · ×1
  • ArkenaIE._real_extract (cyclomatic 24) youtube_dl/extractor/arkena.py:65 — ArkenaIE._real_extract 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.
D1 · Cyclomatic Complexity · Channel9IE._real_extract (cyclomatic 24) · ×1
  • Channel9IE._real_extract (cyclomatic 24) youtube_dl/extractor/channel9.py:99 — Channel9IE._real_extract 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.
D1 · Cyclomatic Complexity · DisneyIE._real_extract (cyclomatic 24) · ×1
  • DisneyIE._real_extract (cyclomatic 24) youtube_dl/extractor/disney.py:80 — DisneyIE._real_extract 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.
D1 · Cyclomatic Complexity · DPlayIE._get_disco_api_info (cyclomatic 24) · ×1
  • DPlayIE._get_disco_api_info (cyclomatic 24) youtube_dl/extractor/dplay.py:187 — DPlayIE._get_disco_api_info 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.
D1 · Cyclomatic Complexity · InstagramIE._real_extract (cyclomatic 24) · ×1
  • InstagramIE._real_extract (cyclomatic 24) REDACTED:142 — InstagramIE._real_extract 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.
D1 · Cyclomatic Complexity · LecturioIE._real_extract (cyclomatic 24) · ×1
  • LecturioIE._real_extract (cyclomatic 24) youtube_dl/extractor/lecturio.py:105 — LecturioIE._real_extract 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.
D1 · Cyclomatic Complexity · InfoExtractor._parse_m3u8_formats (cyclomatic 23) · ×1
  • InfoExtractor._parse_m3u8_formats (cyclomatic 23) REDACTED:1838 — InfoExtractor._parse_m3u8_formats has cyclomatic complexity 23 (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.
D1 · Cyclomatic Complexity · InstagramPlaylistIE._extract_graphql (cyclomatic 23) · ×1
  • InstagramPlaylistIE._extract_graphql (cyclomatic 23) REDACTED:292 — InstagramPlaylistIE._extract_graphql has cyclomatic complexity 23 (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.
D1 · Cyclomatic Complexity · NDREmbedBaseIE._real_extract (cyclomatic 23) · ×1
  • NDREmbedBaseIE._real_extract (cyclomatic 23) youtube_dl/extractor/ndr.py:235 — NDREmbedBaseIE._real_extract has cyclomatic complexity 23 (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.
D1 · Cyclomatic Complexity · NPOIE._get_info (cyclomatic 23) · ×1
  • NPOIE._get_info (cyclomatic 23) youtube_dl/extractor/npo.py:186 — NPOIE._get_info has cyclomatic complexity 23 (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.
D1 · Cyclomatic Complexity · OoyalaBaseIE._extract (cyclomatic 23) · ×1
  • OoyalaBaseIE._extract (cyclomatic 23) youtube_dl/extractor/ooyala.py:26 — OoyalaBaseIE._extract has cyclomatic complexity 23 (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.
D1 · Cyclomatic Complexity · PluralsightIE._real_extract (cyclomatic 23) · ×1
  • PluralsightIE._real_extract (cyclomatic 23) youtube_dl/extractor/pluralsight.py:275 — PluralsightIE._real_extract has cyclomatic complexity 23 (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.
D1 · Cyclomatic Complexity · URPlayIE._real_extract (cyclomatic 23) · ×1
  • URPlayIE._real_extract (cyclomatic 23) youtube_dl/extractor/urplay.py:54 — URPlayIE._real_extract has cyclomatic complexity 23 (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.
D1 · Cyclomatic Complexity · XTubeIE._real_extract (cyclomatic 23) · ×1
  • XTubeIE._real_extract (cyclomatic 23) youtube_dl/extractor/xtube.py:73 — XTubeIE._real_extract has cyclomatic complexity 23 (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.
D1 · Cyclomatic Complexity · YoutubeDL._format_note (cyclomatic 22) · ×1
  • YoutubeDL._format_note (cyclomatic 22) youtube_dl/YoutubeDL.py:2406 — YoutubeDL._format_note has cyclomatic complexity 22 (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.
D1 · Cyclomatic Complexity · GoogleDriveIE._real_extract (cyclomatic 22) · ×1
  • GoogleDriveIE._real_extract (cyclomatic 22) youtube_dl/extractor/googledrive.py:164 — GoogleDriveIE._real_extract 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.
D1 · Cyclomatic Complexity · IviIE._real_extract (cyclomatic 22) · ×1
  • IviIE._real_extract (cyclomatic 22) youtube_dl/extractor/ivi.py:83 — IviIE._real_extract 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.
D1 · Cyclomatic Complexity · MSNIE._real_extract (cyclomatic 22) · ×1
  • MSNIE._real_extract (cyclomatic 22) youtube_dl/extractor/msn.py:69 — MSNIE._real_extract 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.
D1 · Cyclomatic Complexity · YoutubeBaseInfoExtractor._login (cyclomatic 22) · ×1
  • YoutubeBaseInfoExtractor._login (cyclomatic 22) REDACTED:227 — YoutubeBaseInfoExtractor._login 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.
D1 · Cyclomatic Complexity · YoutubeDL.process_ie_result (cyclomatic 21) · ×1
  • YoutubeDL.process_ie_result (cyclomatic 21) youtube_dl/YoutubeDL.py:1001 — YoutubeDL.process_ie_result 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.
D1 · Cyclomatic Complexity · ArteTVIE._real_extract (cyclomatic 21) · ×1
  • ArteTVIE._real_extract (cyclomatic 21) youtube_dl/extractor/arte.py:52 — ArteTVIE._real_extract 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.
D1 · Cyclomatic Complexity · BBCCoUkIE._process_media_selector (cyclomatic 21) · ×1
  • BBCCoUkIE._process_media_selector (cyclomatic 21) youtube_dl/extractor/bbc.py:364 — BBCCoUkIE._process_media_selector 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.
D1 · Cyclomatic Complexity · ITVIE._real_extract (cyclomatic 21) · ×1
  • ITVIE._real_extract (cyclomatic 21) youtube_dl/extractor/itv.py:180 — ITVIE._real_extract 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.
D1 · Cyclomatic Complexity · KonserthusetPlayIE._real_extract (cyclomatic 21) · ×1
  • KonserthusetPlayIE._real_extract (cyclomatic 21) youtube_dl/extractor/konserthusetplay.py:31 — KonserthusetPlayIE._real_extract 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.
D1 · Cyclomatic Complexity · RaiBaseIE._extract_relinker_info (cyclomatic 21) · ×1
  • RaiBaseIE._extract_relinker_info (cyclomatic 21) youtube_dl/extractor/rai.py:36 — RaiBaseIE._extract_relinker_info 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.
D1 · Cyclomatic Complexity · RTBFIE._real_extract (cyclomatic 21) · ×1
  • RTBFIE._real_extract (cyclomatic 21) youtube_dl/extractor/rtbf.py:70 — RTBFIE._real_extract 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.
D1 · Cyclomatic Complexity · XFileShareIE._real_extract (cyclomatic 21) · ×1
  • XFileShareIE._real_extract (cyclomatic 21) youtube_dl/extractor/xfileshare.py:196 — XFileShareIE._real_extract 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.
D1 · Cyclomatic Complexity · YahooIE._extract_yahoo_video (cyclomatic 21) · ×1
  • YahooIE._extract_yahoo_video (cyclomatic 21) REDACTED:180 — YahooIE._extract_yahoo_video 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.
D1 · Cyclomatic Complexity · utils.dfxp2srt (cyclomatic 21) · ×1
  • utils.dfxp2srt (cyclomatic 21) REDACTED:4970 — utils.dfxp2srt 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.
D1 · Cyclomatic Complexity · BiliBiliIE._real_extract (cyclomatic 20) · ×1
  • BiliBiliIE._real_extract (cyclomatic 20) REDACTED:123 — BiliBiliIE._real_extract 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.
D1 · Cyclomatic Complexity · InfoExtractor._parse_jwplayer_formats (cyclomatic 20) · ×1
  • InfoExtractor._parse_jwplayer_formats (cyclomatic 20) REDACTED:3111 — InfoExtractor._parse_jwplayer_formats 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.
D1 · Cyclomatic Complexity · GloboIE._real_extract (cyclomatic 20) · ×1
  • GloboIE._real_extract (cyclomatic 20) REDACTED:93 — GloboIE._real_extract 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.
D1 · Cyclomatic Complexity · RteBaseIE._real_extract (cyclomatic 20) · ×1
  • RteBaseIE._real_extract (cyclomatic 20) youtube_dl/extractor/rte.py:20 — RteBaseIE._real_extract 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.
D1 · Cyclomatic Complexity · ServusIE._real_extract (cyclomatic 20) · ×1
  • ServusIE._real_extract (cyclomatic 20) REDACTED:63 — ServusIE._real_extract 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.
D1 · Cyclomatic Complexity · ToggleIE._real_extract (cyclomatic 20) · ×1
  • ToggleIE._real_extract (cyclomatic 20) youtube_dl/extractor/toggle.py:90 — ToggleIE._real_extract 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.
D1 · Cyclomatic Complexity · YandexDiskIE._real_extract (cyclomatic 20) · ×1
  • YandexDiskIE._real_extract (cyclomatic 20) youtube_dl/extractor/yandexdisk.py:59 — YandexDiskIE._real_extract 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.
D1 · Cyclomatic Complexity · utils.decode_png (cyclomatic 20) · ×1
  • utils.decode_png (cyclomatic 20) REDACTED:6061 — utils.decode_png 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.
D1 · Cyclomatic Complexity · YoutubeDL.process_subtitles (cyclomatic 19) · ×1
  • YoutubeDL.process_subtitles (cyclomatic 19) youtube_dl/YoutubeDL.py:1872 — YoutubeDL.process_subtitles 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.
D1 · Cyclomatic Complexity · AfreecaTVIE._real_extract (cyclomatic 19) · ×1
  • AfreecaTVIE._real_extract (cyclomatic 19) youtube_dl/extractor/afreecatv.py:223 — AfreecaTVIE._real_extract 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.
D1 · Cyclomatic Complexity · AMPIE._extract_feed_info (cyclomatic 19) · ×1
  • AMPIE._extract_feed_info (cyclomatic 19) youtube_dl/extractor/amp.py:18 — AMPIE._extract_feed_info 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.
D1 · Cyclomatic Complexity · CCMAIE._real_extract (cyclomatic 19) · ×1
  • CCMAIE._real_extract (cyclomatic 19) youtube_dl/extractor/ccma.py:63 — CCMAIE._real_extract 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.
D1 · Cyclomatic Complexity · NovaEmbedIE._real_extract (cyclomatic 19) · ×1
  • NovaEmbedIE._real_extract (cyclomatic 19) youtube_dl/extractor/nova.py:32 — NovaEmbedIE._real_extract 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.
D1 · Cyclomatic Complexity · SixPlayIE._real_extract (cyclomatic 19) · ×1
  • SixPlayIE._real_extract (cyclomatic 19) youtube_dl/extractor/sixplay.py:43 — SixPlayIE._real_extract 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.
D1 · Cyclomatic Complexity · SteamIE._real_extract (cyclomatic 19) · ×1
  • SteamIE._real_extract (cyclomatic 19) youtube_dl/extractor/steam.py:68 — SteamIE._real_extract 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.
D1 · Cyclomatic Complexity · VevoIE._real_extract (cyclomatic 19) · ×1
  • VevoIE._real_extract (cyclomatic 19) youtube_dl/extractor/vevo.py:191 — VevoIE._real_extract 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.
D1 · Cyclomatic Complexity · ZypeIE._real_extract (cyclomatic 19) · ×1
  • ZypeIE._real_extract (cyclomatic 19) youtube_dl/extractor/zype.py:43 — ZypeIE._real_extract 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.
D1 · Cyclomatic Complexity · YoutubeDL._match_entry (cyclomatic 18) · ×1
  • YoutubeDL._match_entry (cyclomatic 18) youtube_dl/YoutubeDL.py:793 — YoutubeDL._match_entry 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.
D1 · Cyclomatic Complexity · FileDownloader.report_progress (cyclomatic 18) · ×1
  • FileDownloader.report_progress (cyclomatic 18) youtube_dl/downloader/common.py:259 — FileDownloader.report_progress has cyclomatic complexity 18 (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.
D1 · Cyclomatic Complexity · CanvasIE._real_extract (cyclomatic 18) · ×1
  • CanvasIE._real_extract (cyclomatic 18) youtube_dl/extractor/canvas.py:49 — CanvasIE._real_extract 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.
D1 · Cyclomatic Complexity · ChaturbateIE._real_extract (cyclomatic 18) · ×1
  • ChaturbateIE._real_extract (cyclomatic 18) youtube_dl/extractor/chaturbate.py:38 — ChaturbateIE._real_extract 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.
D1 · Cyclomatic Complexity · FirstTVIE._real_extract (cyclomatic 18) · ×1
  • FirstTVIE._real_extract (cyclomatic 18) youtube_dl/extractor/firsttv.py:62 — FirstTVIE._real_extract 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.
D1 · Cyclomatic Complexity · HBOBaseIE._extract_info (cyclomatic 18) · ×1
  • HBOBaseIE._extract_info (cyclomatic 18) youtube_dl/extractor/hbo.py:56 — HBOBaseIE._extract_info 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.
D1 · Cyclomatic Complexity · LEGOIE._real_extract (cyclomatic 18) · ×1
  • LEGOIE._real_extract (cyclomatic 18) youtube_dl/extractor/lego.py:66 — LEGOIE._real_extract 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.
D1 · Cyclomatic Complexity · MedalTVIE._real_extract (cyclomatic 18) · ×1
  • MedalTVIE._real_extract (cyclomatic 18) youtube_dl/extractor/medaltv.py:53 — MedalTVIE._real_extract 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.
D1 · Cyclomatic Complexity · PeerTubeIE._real_extract (cyclomatic 18) · ×1
  • PeerTubeIE._real_extract (cyclomatic 18) youtube_dl/extractor/peertube.py:531 — PeerTubeIE._real_extract 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.
D1 · Cyclomatic Complexity · SRGSSRIE._real_extract (cyclomatic 18) · ×1
  • SRGSSRIE._real_extract (cyclomatic 18) youtube_dl/extractor/srgssr.py:84 — SRGSSRIE._real_extract 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.
D1 · Cyclomatic Complexity · Vbox7IE._real_extract (cyclomatic 18) · ×1
  • Vbox7IE._real_extract (cyclomatic 18) youtube_dl/extractor/vbox7.py:111 — Vbox7IE._real_extract has cyclomatic complexity 18 (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.
D1 · Cyclomatic Complexity · VGTVIE._real_extract (cyclomatic 18) · ×1
  • VGTVIE._real_extract (cyclomatic 18) youtube_dl/extractor/vgtv.py:167 — VGTVIE._real_extract 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.
D1 · Cyclomatic Complexity · LazyList.__getitem__ (cyclomatic 18) · ×1
  • LazyList.__getitem__ (cyclomatic 18) REDACTED:4094 — LazyList.__getitem__ has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · AdultSwimIE._real_extract (cyclomatic 17) · ×1
  • AdultSwimIE._real_extract (cyclomatic 17) REDACTED:91 — AdultSwimIE._real_extract 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.
D1 · Cyclomatic Complexity · BrightcoveLegacyIE._real_extract (cyclomatic 17) · ×1
  • BrightcoveLegacyIE._real_extract (cyclomatic 17) youtube_dl/extractor/brightcove.py:286 — BrightcoveLegacyIE._real_extract 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.
D1 · Cyclomatic Complexity · InfoExtractor._request_webpage (cyclomatic 17) · ×1
  • InfoExtractor._request_webpage (cyclomatic 17) REDACTED:647 — InfoExtractor._request_webpage 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.
D1 · Cyclomatic Complexity · HKETVIE._real_extract (cyclomatic 17) · ×1
  • HKETVIE._real_extract (cyclomatic 17) youtube_dl/extractor/hketv.py:74 — HKETVIE._real_extract 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.
D1 · Cyclomatic Complexity · LinuxAcademyIE._real_extract (cyclomatic 17) · ×1
  • LinuxAcademyIE._real_extract (cyclomatic 17) youtube_dl/extractor/linuxacademy.py:154 — LinuxAcademyIE._real_extract 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.
D1 · Cyclomatic Complexity · MixcloudIE._real_extract (cyclomatic 17) · ×1
  • MixcloudIE._real_extract (cyclomatic 17) youtube_dl/extractor/mixcloud.py:99 — MixcloudIE._real_extract 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.
D1 · Cyclomatic Complexity · NineGagIE._real_extract (cyclomatic 17) · ×1
  • NineGagIE._real_extract (cyclomatic 17) youtube_dl/extractor/ninegag.py:39 — NineGagIE._real_extract 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.
D1 · Cyclomatic Complexity · OdnoklassnikiIE._real_extract (cyclomatic 17) · ×1
  • OdnoklassnikiIE._real_extract (cyclomatic 17) youtube_dl/extractor/odnoklassniki.py:133 — OdnoklassnikiIE._real_extract has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · OnetBaseIE._extract_from_id (cyclomatic 17) · ×1
  • OnetBaseIE._extract_from_id (cyclomatic 17) youtube_dl/extractor/onet.py:29 — OnetBaseIE._extract_from_id 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.
D1 · Cyclomatic Complexity · RedTubeIE._real_extract (cyclomatic 17) · ×1
  • RedTubeIE._real_extract (cyclomatic 17) youtube_dl/extractor/redtube.py:45 — RedTubeIE._real_extract 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.
D1 · Cyclomatic Complexity · SVTBaseIE._extract_video (cyclomatic 17) · ×1
  • SVTBaseIE._extract_video (cyclomatic 17) youtube_dl/extractor/svt.py:22 — SVTBaseIE._extract_video 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.
D1 · Cyclomatic Complexity · VideomoreIE._real_extract (cyclomatic 17) · ×1
  • VideomoreIE._real_extract (cyclomatic 17) youtube_dl/extractor/videomore.py:147 — VideomoreIE._real_extract 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.
D1 · Cyclomatic Complexity · WatchBoxIE._real_extract (cyclomatic 17) · ×1
  • WatchBoxIE._real_extract (cyclomatic 17) youtube_dl/extractor/watchbox.py:65 — WatchBoxIE._real_extract has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WDRIE._real_extract (cyclomatic 17) · ×1
  • WDRIE._real_extract (cyclomatic 17) youtube_dl/extractor/wdr.py:44 — WDRIE._real_extract 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.
D1 · Cyclomatic Complexity · ZattooPlatformBaseIE._extract_formats (cyclomatic 17) · ×1
  • ZattooPlatformBaseIE._extract_formats (cyclomatic 17) youtube_dl/extractor/zattoo.py:124 — ZattooPlatformBaseIE._extract_formats 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.
D1 · Cyclomatic Complexity · YoutubeDLHandler.http_response (cyclomatic 17) · ×1
  • YoutubeDLHandler.http_response (cyclomatic 17) REDACTED:2789 — YoutubeDLHandler.http_response 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.
D1 · Cyclomatic Complexity · utils.parse_codecs (cyclomatic 17) · ×1
  • utils.parse_codecs (cyclomatic 17) REDACTED:4742 — utils.parse_codecs 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.
D1 · Cyclomatic Complexity · YoutubeDL.prepare_filename (cyclomatic 16) · ×1
  • YoutubeDL.prepare_filename (cyclomatic 16) youtube_dl/YoutubeDL.py:704 — YoutubeDL.prepare_filename has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · YoutubeDL.__process_playlist (cyclomatic 16) · ×1
  • YoutubeDL.__process_playlist (cyclomatic 16) youtube_dl/YoutubeDL.py:1108 — YoutubeDL.__process_playlist 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.
D1 · Cyclomatic Complexity · DashSegmentsFD.real_download (cyclomatic 16) · ×1
  • DashSegmentsFD.real_download (cyclomatic 16) youtube_dl/downloader/dash.py:20 — DashSegmentsFD.real_download 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.
D1 · Cyclomatic Complexity · ARDMediathekIE._real_extract (cyclomatic 16) · ×1
  • ARDMediathekIE._real_extract (cyclomatic 16) youtube_dl/extractor/ard.py:161 — ARDMediathekIE._real_extract 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.
D1 · Cyclomatic Complexity · InfoExtractor._parse_jwplayer_data (cyclomatic 16) · ×1
  • InfoExtractor._parse_jwplayer_data (cyclomatic 16) REDACTED:3037 — InfoExtractor._parse_jwplayer_data 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.
D1 · Cyclomatic Complexity · CondeNastIE._extract_video (cyclomatic 16) · ×1
  • CondeNastIE._extract_video (cyclomatic 16) youtube_dl/extractor/condenast.py:143 — CondeNastIE._extract_video 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.
D1 · Cyclomatic Complexity · FunimationIE._real_extract (cyclomatic 16) · ×1
  • FunimationIE._real_extract (cyclomatic 16) youtube_dl/extractor/funimation.py:81 — FunimationIE._real_extract 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.
D1 · Cyclomatic Complexity · ImgGamingBaseIE._real_extract (cyclomatic 16) · ×1
  • ImgGamingBaseIE._real_extract (cyclomatic 16) youtube_dl/extractor/imggaming.py:64 — ImgGamingBaseIE._real_extract 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.
D1 · Cyclomatic Complexity · LyndaIE._real_extract (cyclomatic 16) · ×1
  • LyndaIE._real_extract (cyclomatic 16) youtube_dl/extractor/lynda.py:130 — LyndaIE._real_extract 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.
D1 · Cyclomatic Complexity · MailRuIE._real_extract (cyclomatic 16) · ×1
  • MailRuIE._real_extract (cyclomatic 16) youtube_dl/extractor/mailru.py:99 — MailRuIE._real_extract 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.
D1 · Cyclomatic Complexity · MindsIE._real_extract (cyclomatic 16) · ×1
  • MindsIE._real_extract (cyclomatic 16) youtube_dl/extractor/minds.py:71 — MindsIE._real_extract 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.
D1 · Cyclomatic Complexity · VidmeIE._real_extract (cyclomatic 16) · ×1
  • VidmeIE._real_extract (cyclomatic 16) youtube_dl/extractor/vidme.py:135 — VidmeIE._real_extract 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.
D1 · Cyclomatic Complexity · VoxMediaVolumeIE._real_extract (cyclomatic 16) · ×1
  • VoxMediaVolumeIE._real_extract (cyclomatic 16) youtube_dl/extractor/voxmedia.py:18 — VoxMediaVolumeIE._real_extract 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.
D1 · Cyclomatic Complexity · WistiaBaseIE._extract_media (cyclomatic 16) · ×1
  • WistiaBaseIE._extract_media (cyclomatic 16) youtube_dl/extractor/wistia.py:33 — WistiaBaseIE._extract_media 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.
D1 · Cyclomatic Complexity · ZingMp3BaseIE._extract_item (cyclomatic 16) · ×1
  • ZingMp3BaseIE._extract_item (cyclomatic 16) youtube_dl/extractor/zingmp3.py:15 — ZingMp3BaseIE._extract_item 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.
D1 · Cyclomatic Complexity · JSInterpreter._separate_at_op (cyclomatic 16) · ×1
  • JSInterpreter._separate_at_op (cyclomatic 16) youtube_dl/jsinterp.py:710 — JSInterpreter._separate_at_op 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.
D1 · Cyclomatic Complexity · EmbedThumbnailPP.run (cyclomatic 16) · ×1
  • EmbedThumbnailPP.run (cyclomatic 16) youtube_dl/postprocessor/embedthumbnail.py:33 — EmbedThumbnailPP.run 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.
D2 · Cognitive Complexity · YoutubeIE._real_extract (cognitive 382) · ×1
  • YoutubeIE._real_extract (cognitive 382) REDACTED:2362 — YoutubeIE._real_extract has cognitive complexity 382 (threshold 15). Drivers by points: if/else 94 (237 pts), loops 22 (58 pts), boolean chains 54, ternaries 14 (30 pts), error handling 1 (3 pts) (nesting depth added 197). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GenericIE._real_extract (cognitive 287) · ×1
  • GenericIE._real_extract (cognitive 287) youtube_dl/extractor/generic.py:2529 — GenericIE._real_extract has cognitive complexity 287 (threshold 15). Drivers by points: if/else 196 (247 pts), boolean chains 15, loops 7 (13 pts), ternaries 3 (9 pts), error handling 2 (3 pts) (nesting depth added 64). 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · JSInterpreter.interpret_statement (cognitive 226) · ×1
  • JSInterpreter.interpret_statement (cognitive 226) youtube_dl/jsinterp.py:832 — JSInterpreter.interpret_statement has cognitive complexity 226 (threshold 15). Drivers by points: if/else 79 (152 pts), ternaries 11 (28 pts), loops 10 (18 pts), boolean chains 16, error handling 4 (12 pts) (nesting depth added 106). 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.
D2 · Cognitive Complexity · BBCIE._real_extract (cognitive 207) · ×1
  • BBCIE._real_extract (cognitive 207) youtube_dl/extractor/bbc.py:897 — BBCIE._real_extract has cognitive complexity 207 (threshold 15). Drivers by points: if/else 51 (127 pts), boolean chains 30, loops 11 (28 pts), ternaries 5 (15 pts), error handling 1 (7 pts) (nesting depth added 109). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · youtube_dl._real_main (cognitive 164) · ×1
  • youtube_dl._real_main (cognitive 164) youtube_dl/__init__.py:49 — youtube_dl._real_main has cognitive complexity 164 (threshold 15). Drivers by points: if/else 82 (113 pts), boolean chains 29, ternaries 7 (10 pts), loops 4 (9 pts), error handling 2 (3 pts) (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.
D2 · Cognitive Complexity · YoutubeTabIE._entries (cognitive 157) · ×1
  • YoutubeTabIE._entries (cognitive 157) REDACTED:3822 — YoutubeTabIE._entries has cognitive complexity 157 (threshold 15). Drivers by points: if/else 29 (83 pts), loops 17 (63 pts), boolean chains 5, error handling 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 104). 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.
D2 · Cognitive Complexity · InfoExtractor._parse_mpd_formats_and_subtitles (cognitive 154) · ×1
  • InfoExtractor._parse_mpd_formats_and_subtitles (cognitive 154) REDACTED:2295 — InfoExtractor._parse_mpd_formats_and_subtitles has cognitive complexity 154 (threshold 15). Drivers by points: if/else 24 (84 pts), loops 9 (44 pts), ternaries 3 (14 pts), boolean chains 12 (nesting depth added 106). 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.
D2 · Cognitive Complexity · YoutubeDL.process_info (cognitive 140) · ×1
  • YoutubeDL.process_info (cognitive 140) youtube_dl/YoutubeDL.py:1952 — YoutubeDL.process_info has cognitive complexity 140 (threshold 15). Drivers by points: if/else 44 (94 pts), error handling 9 (28 pts), boolean chains 12, loops 2 (6 pts) (nesting depth added 73). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · XHamsterIE._real_extract (cognitive 132) · ×1
  • XHamsterIE._real_extract (cognitive 132) youtube_dl/extractor/xhamster.py:131 — XHamsterIE._real_extract has cognitive complexity 132 (threshold 15). Drivers by points: if/else 23 (83 pts), loops 9 (31 pts), boolean chains 9, ternaries 7 (9 pts) (nesting depth added 84). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · HlsFD.real_download (cognitive 116) · ×1
  • HlsFD.real_download (cognitive 116) youtube_dl/downloader/hls.py:60 — HlsFD.real_download has cognitive complexity 116 (threshold 15). Drivers by points: if/else 25 (91 pts), loops 4 (8 pts), ternaries 2 (8 pts), error handling 1 (5 pts), boolean chains 4 (nesting depth added 80). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · FacebookIE._extract_from_url (cognitive 108) · ×1
  • FacebookIE._extract_from_url (cognitive 108) youtube_dl/extractor/facebook.py:380 — FacebookIE._extract_from_url has cognitive complexity 108 (threshold 15). Drivers by points: if/else 28 (56 pts), loops 11 (31 pts), boolean chains 16, ternaries 1 (5 pts) (nesting depth added 52). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CrunchyrollIE._real_extract (cognitive 92) · ×1
  • CrunchyrollIE._real_extract (cognitive 92) REDACTED:414 — CrunchyrollIE._real_extract has cognitive complexity 92 (threshold 15). Drivers by points: if/else 32 (75 pts), loops 7 (14 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · DRTVIE._real_extract (cognitive 90) · ×1
  • DRTVIE._real_extract (cognitive 90) youtube_dl/extractor/drtv.py:119 — DRTVIE._real_extract has cognitive complexity 90 (threshold 15). Drivers by points: if/else 22 (57 pts), loops 5 (15 pts), boolean chains 8, error handling 1 (5 pts), ternaries 1 (5 pts) (nesting depth added 53). 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.
D2 · Cognitive Complexity · YoutubeDL.process_video_result (cognitive 86) · ×1
  • YoutubeDL.process_video_result (cognitive 86) youtube_dl/YoutubeDL.py:1645 — YoutubeDL.process_video_result has cognitive complexity 86 (threshold 15). Drivers by points: if/else 34 (57 pts), loops 9 (18 pts), boolean chains 8, ternaries 1 (3 pts) (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.
D2 · Cognitive Complexity · UdemyIE._real_extract (cognitive 84) · ×1
  • UdemyIE._real_extract (cognitive 84) youtube_dl/extractor/udemy.py:214 — UdemyIE._real_extract has cognitive complexity 84 (threshold 15). Drivers by points: if/else 23 (56 pts), loops 5 (11 pts), boolean chains 9, ternaries 2 (7 pts), error handling 1 (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TEDIE._talk_info (cognitive 82) · ×1
  • TEDIE._talk_info (cognitive 82) youtube_dl/extractor/ted.py:179 — TEDIE._talk_info has cognitive complexity 82 (threshold 15). Drivers by points: if/else 22 (58 pts), loops 7 (16 pts), boolean chains 8 (nesting depth added 45). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CeskaTelevizeIE._real_extract (cognitive 77) · ×1
  • CeskaTelevizeIE._real_extract (cognitive 77) youtube_dl/extractor/ceskatelevize.py:107 — CeskaTelevizeIE._real_extract has cognitive complexity 77 (threshold 15). Drivers by points: if/else 28 (58 pts), loops 5 (12 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · InfoExtractor._parse_html5_media_entries (cognitive 75) · ×1
  • InfoExtractor._parse_html5_media_entries (cognitive 75) REDACTED:2785 — InfoExtractor._parse_html5_media_entries has cognitive complexity 75 (threshold 15). Drivers by points: if/else 12 (47 pts), loops 6 (20 pts), boolean chains 8 (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · NiconicoIE._real_extract (cognitive 74) · ×1
  • NiconicoIE._real_extract (cognitive 74) REDACTED:381 — NiconicoIE._real_extract has cognitive complexity 74 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 21, ternaries 8 (19 pts), loops 3 (5 pts), error handling 1 (2 pts) (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.
D2 · Cognitive Complexity · JSInterpreter._separate (cognitive 72) · ×1
  • JSInterpreter._separate (cognitive 72) youtube_dl/jsinterp.py:625 — JSInterpreter._separate has cognitive complexity 72 (threshold 15). Drivers by points: if/else 19 (43 pts), boolean chains 16, ternaries 2 (9 pts), loops 2 (4 pts) (nesting depth added 33). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PBSIE._real_extract (cognitive 71) · ×1
  • PBSIE._real_extract (cognitive 71) youtube_dl/extractor/pbs.py:539 — PBSIE._real_extract has cognitive complexity 71 (threshold 15). Drivers by points: if/else 21 (53 pts), loops 5 (13 pts), boolean chains 5 (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ProSiebenSat1BaseIE._extract_video_info (cognitive 71) · ×1
  • ProSiebenSat1BaseIE._extract_video_info (cognitive 71) REDACTED:25 — ProSiebenSat1BaseIE._extract_video_info has cognitive complexity 71 (threshold 15). Drivers by points: if/else 17 (46 pts), ternaries 2 (12 pts), loops 3 (8 pts), boolean chains 5 (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AdobePassIE._extract_mvpd_auth (cognitive 69) · ×1
  • AdobePassIE._extract_mvpd_auth (cognitive 69) youtube_dl/extractor/adobepass.py:1354 — AdobePassIE._extract_mvpd_auth has cognitive complexity 69 (threshold 15). Drivers by points: if/else 22 (63 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 41). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BandcampIE._real_extract (cognitive 69) · ×1
  • BandcampIE._real_extract (cognitive 69) youtube_dl/extractor/bandcamp.py:89 — BandcampIE._real_extract has cognitive complexity 69 (threshold 15). Drivers by points: if/else 15 (51 pts), loops 3 (12 pts), boolean chains 5, ternaries 1 (nesting depth added 45). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GoIE._real_extract (cognitive 69) · ×1
  • GoIE._real_extract (cognitive 69) youtube_dl/extractor/go.py:158 — GoIE._real_extract has cognitive complexity 69 (threshold 15). Drivers by points: if/else 19 (43 pts), loops 5 (10 pts), ternaries 2 (9 pts), boolean chains 7 (nesting depth added 36). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PornHubIE._real_extract (cognitive 68) · ×1
  • PornHubIE._real_extract (cognitive 68) REDACTED:261 — PornHubIE._real_extract has cognitive complexity 68 (threshold 15). Drivers by points: if/else 21 (52 pts), loops 5 (12 pts), boolean chains 4 (nesting depth added 38). 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.
D2 · Cognitive Complexity · NPOIE._get_old_info (cognitive 65) · ×1
  • NPOIE._get_old_info (cognitive 65) youtube_dl/extractor/npo.py:299 — NPOIE._get_old_info has cognitive complexity 65 (threshold 15). Drivers by points: if/else 21 (48 pts), boolean chains 7, loops 3 (7 pts), error handling 1 (2 pts), ternaries 1 (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.
D2 · Cognitive Complexity · VimeoBaseInfoExtractor._parse_config (cognitive 64) · ×1
  • VimeoBaseInfoExtractor._parse_config (cognitive 64) youtube_dl/extractor/vimeo.py:123 — VimeoBaseInfoExtractor._parse_config has cognitive complexity 64 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 8 (15 pts), boolean chains 12, ternaries 3 (7 pts) (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.
D2 · Cognitive Complexity · SWFInterpreter.__init__ (cognitive 60) · ×1
  • SWFInterpreter.__init__ (cognitive 60) youtube_dl/swfinterp.py:186 — SWFInterpreter.__init__ has cognitive complexity 60 (threshold 15). Drivers by points: loops 25 (41 pts), if/else 9 (19 pts) (nesting depth added 26). 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.
D2 · Cognitive Complexity · TurnerBaseIE._extract_cvp_info (cognitive 59) · ×1
  • TurnerBaseIE._extract_cvp_info (cognitive 59) youtube_dl/extractor/turner.py:53 — TurnerBaseIE._extract_cvp_info has cognitive complexity 59 (threshold 15). Drivers by points: if/else 16 (42 pts), boolean chains 8, loops 4 (8 pts), ternaries 1 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CSpanIE._real_extract (cognitive 58) · ×1
  • CSpanIE._real_extract (cognitive 58) youtube_dl/extractor/cspan.py:84 — CSpanIE._real_extract has cognitive complexity 58 (threshold 15). Drivers by points: if/else 18 (31 pts), ternaries 7 (16 pts), loops 4 (8 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · ArcPublishingIE._real_extract (cognitive 57) · ×1
  • ArcPublishingIE._real_extract (cognitive 57) youtube_dl/extractor/arcpublishing.py:88 — ArcPublishingIE._real_extract has cognitive complexity 57 (threshold 15). Drivers by points: if/else 13 (39 pts), loops 5 (9 pts), ternaries 3 (7 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · Channel9IE._real_extract (cognitive 57) · ×1
  • Channel9IE._real_extract (cognitive 57) youtube_dl/extractor/channel9.py:99 — Channel9IE._real_extract has cognitive complexity 57 (threshold 15). Drivers by points: if/else 17 (37 pts), loops 5 (13 pts), ternaries 1 (4 pts), boolean chains 3 (nesting depth added 31). 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.
D2 · Cognitive Complexity · BrightcoveNewIE._parse_brightcove_metadata (cognitive 56) · ×1
  • BrightcoveNewIE._parse_brightcove_metadata (cognitive 56) youtube_dl/extractor/brightcove.py:471 — BrightcoveNewIE._parse_brightcove_metadata has cognitive complexity 56 (threshold 15). Drivers by points: if/else 15 (30 pts), boolean chains 14, ternaries 3 (9 pts), 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.
D2 · Cognitive Complexity · BBCCoUkIE._process_media_selector (cognitive 55) · ×1
  • BBCCoUkIE._process_media_selector (cognitive 55) youtube_dl/extractor/bbc.py:364 — BBCCoUkIE._process_media_selector has cognitive complexity 55 (threshold 15). Drivers by points: if/else 11 (38 pts), loops 3 (9 pts), error handling 1 (5 pts), boolean chains 3 (nesting depth added 37). 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.
D2 · Cognitive Complexity · KalturaIE._real_extract (cognitive 55) · ×1
  • KalturaIE._real_extract (cognitive 55) youtube_dl/extractor/kaltura.py:229 — KalturaIE._real_extract has cognitive complexity 55 (threshold 15). Drivers by points: if/else 23 (39 pts), boolean chains 7, error handling 1 (3 pts), loops 2 (3 pts), ternaries 2 (3 pts) (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.
D2 · Cognitive Complexity · LimelightBaseIE._extract_info (cognitive 55) · ×1
  • LimelightBaseIE._extract_info (cognitive 55) youtube_dl/extractor/limelight.py:88 — LimelightBaseIE._extract_info has cognitive complexity 55 (threshold 15). Drivers by points: if/else 14 (37 pts), loops 5 (10 pts), boolean chains 8 (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.
D2 · Cognitive Complexity · CrackleIE._real_extract (cognitive 54) · ×1
  • CrackleIE._real_extract (cognitive 54) youtube_dl/extractor/crackle.py:69 — CrackleIE._real_extract has cognitive complexity 54 (threshold 15). Drivers by points: if/else 14 (38 pts), loops 4 (9 pts), boolean chains 4, error handling 1 (2 pts), ternaries 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.
D2 · Cognitive Complexity · NRKIE._real_extract (cognitive 54) · ×1
  • NRKIE._real_extract (cognitive 54) youtube_dl/extractor/nrk.py:146 — NRKIE._real_extract has cognitive complexity 54 (threshold 15). Drivers by points: if/else 20 (37 pts), boolean chains 11, loops 3, ternaries 1 (3 pts) (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.
D2 · Cognitive Complexity · SoundcloudIE._extract_info_dict (cognitive 54) · ×1
  • SoundcloudIE._extract_info_dict (cognitive 54) youtube_dl/extractor/soundcloud.py:318 — SoundcloudIE._extract_info_dict has cognitive complexity 54 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 13, loops 3 (5 pts), ternaries 1 (2 pts) (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.
D2 · Cognitive Complexity · SteamIE._real_extract (cognitive 54) · ×1
  • SteamIE._real_extract (cognitive 54) youtube_dl/extractor/steam.py:68 — SteamIE._real_extract has cognitive complexity 54 (threshold 15). Drivers by points: if/else 15 (38 pts), loops 4 (15 pts), boolean chains 1 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · FFmpegFD._call_downloader (cognitive 53) · ×1
  • FFmpegFD._call_downloader (cognitive 53) youtube_dl/downloader/external.py:373 — FFmpegFD._call_downloader has cognitive complexity 53 (threshold 15). Drivers by points: if/else 25 (40 pts), boolean chains 6, loops 2 (4 pts), ternaries 1 (2 pts), error handling 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.
D2 · Cognitive Complexity · RTSIE._real_extract (cognitive 53) · ×1
  • RTSIE._real_extract (cognitive 53) youtube_dl/extractor/rts.py:118 — RTSIE._real_extract has cognitive complexity 53 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 9, ternaries 4 (7 pts), loops 3 (4 pts) (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.
D2 · Cognitive Complexity · InfoExtractor._parse_ism_formats (cognitive 52) · ×1
  • InfoExtractor._parse_ism_formats (cognitive 52) REDACTED:2690 — InfoExtractor._parse_ism_formats has cognitive complexity 52 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 4 (12 pts), loops 4 (10 pts), boolean chains 9, error handling 1 (5 pts) (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.
D2 · Cognitive Complexity · PluralsightIE._real_extract (cognitive 51) · ×1
  • PluralsightIE._real_extract (cognitive 51) youtube_dl/extractor/pluralsight.py:275 — PluralsightIE._real_extract has cognitive complexity 51 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 6 (12 pts), ternaries 2 (5 pts), error handling 1 (3 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · ThreeQSDNIE._real_extract (cognitive 51) · ×1
  • ThreeQSDNIE._real_extract (cognitive 51) youtube_dl/extractor/threeqsdn.py:87 — ThreeQSDNIE._real_extract has cognitive complexity 51 (threshold 15). Drivers by points: if/else 9 (27 pts), boolean chains 9, ternaries 3 (8 pts), loops 4 (6 pts), error handling 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.
D2 · Cognitive Complexity · MetacafeIE._real_extract (cognitive 50) · ×1
  • MetacafeIE._real_extract (cognitive 50) youtube_dl/extractor/metacafe.py:131 — MetacafeIE._real_extract has cognitive complexity 50 (threshold 15). Drivers by points: if/else 24 (41 pts), loops 2 (6 pts), boolean chains 2, ternaries 1 (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.
D2 · Cognitive Complexity · F4mFD.real_download (cognitive 48) · ×1
  • F4mFD.real_download (cognitive 48) youtube_dl/downloader/f4m.py:319 — F4mFD.real_download has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 6, error handling 2 (5 pts), loops 2 (3 pts) (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.
D2 · Cognitive Complexity · InfoExtractor._parse_m3u8_formats (cognitive 48) · ×1
  • InfoExtractor._parse_m3u8_formats (cognitive 48) REDACTED:1838 — InfoExtractor._parse_m3u8_formats has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (34 pts), ternaries 2 (8 pts), boolean chains 4, 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.
D2 · Cognitive Complexity · NovaEmbedIE._real_extract (cognitive 48) · ×1
  • NovaEmbedIE._real_extract (cognitive 48) youtube_dl/extractor/nova.py:32 — NovaEmbedIE._real_extract has cognitive complexity 48 (threshold 15). Drivers by points: if/else 10 (30 pts), loops 5 (14 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · TV2IE._real_extract (cognitive 47) · ×1
  • TV2IE._real_extract (cognitive 47) youtube_dl/extractor/tv2.py:41 — TV2IE._real_extract has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 7, ternaries 2 (6 pts), loops 2 (3 pts), error handling 1 (2 pts) (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.
D2 · Cognitive Complexity · TwitterIE._real_extract (cognitive 47) · ×1
  • TwitterIE._real_extract (cognitive 47) youtube_dl/extractor/twitter.py:432 — TwitterIE._real_extract has cognitive complexity 47 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 5 (15 pts), boolean chains 7, loops 2 (5 pts) (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ADNIE._real_extract (cognitive 46) · ×1
  • ADNIE._real_extract (cognitive 46) youtube_dl/extractor/adn.py:165 — ADNIE._real_extract has cognitive complexity 46 (threshold 15). Drivers by points: boolean chains 18, if/else 7 (18 pts), loops 4 (8 pts), error handling 1 (2 pts) (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.
D2 · Cognitive Complexity · InfoExtractor._parse_f4m_formats (cognitive 46) · ×1
  • InfoExtractor._parse_f4m_formats (cognitive 46) REDACTED:1699 — InfoExtractor._parse_f4m_formats has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (25 pts), ternaries 4 (12 pts), boolean chains 8, loops 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · update.update_self (cognitive 46) · ×1
  • update.update_self (cognitive 46) youtube_dl/update.py:34 — update.update_self has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (32 pts), error handling 7 (12 pts), boolean chains 1, ternaries 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.
D2 · Cognitive Complexity · InstagramPlaylistIE._extract_graphql (cognitive 45) · ×1
  • InstagramPlaylistIE._extract_graphql (cognitive 45) REDACTED:292 — InstagramPlaylistIE._extract_graphql has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 8, loops 3 (5 pts), error handling 1 (3 pts) (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.
D2 · Cognitive Complexity · PuhuTVIE._real_extract (cognitive 45) · ×1
  • PuhuTVIE._real_extract (cognitive 45) youtube_dl/extractor/puhutv.py:59 — PuhuTVIE._real_extract has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 16, loops 4, 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.
D2 · Cognitive Complexity · ArkenaIE._real_extract (cognitive 44) · ×1
  • ArkenaIE._real_extract (cognitive 44) youtube_dl/extractor/arkena.py:65 — ArkenaIE._real_extract has cognitive complexity 44 (threshold 15). Drivers by points: if/else 8 (33 pts), loops 3 (6 pts), boolean chains 5 (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.
D2 · Cognitive Complexity · InfoExtractor._json_ld (cognitive 44) · ×1
  • InfoExtractor._json_ld (cognitive 44) REDACTED:1355 — InfoExtractor._json_ld has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (37 pts), boolean chains 6, loops 1 (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.
D2 · Cognitive Complexity · FFmpegExtractAudioPP.run (cognitive 44) · ×1
  • FFmpegExtractAudioPP.run (cognitive 44) youtube_dl/postprocessor/ffmpeg.py:265 — FFmpegExtractAudioPP.run has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (36 pts), boolean chains 6, error handling 2 (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.
D2 · Cognitive Complexity · ARDMediathekBaseIE._extract_formats (cognitive 43) · ×1
  • ARDMediathekBaseIE._extract_formats (cognitive 43) youtube_dl/extractor/ard.py:65 — ARDMediathekBaseIE._extract_formats has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (35 pts), loops 3 (6 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · InstagramIE._real_extract (cognitive 43) · ×1
  • InstagramIE._real_extract (cognitive 43) REDACTED:142 — InstagramIE._real_extract has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 7, loops 1 (4 pts), ternaries 1 (4 pts) (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · VimeoIE._real_extract (cognitive 43) · ×1
  • VimeoIE._real_extract (cognitive 43) youtube_dl/extractor/vimeo.py:635 — VimeoIE._real_extract has cognitive complexity 43 (threshold 15). Drivers by points: if/else 24 (33 pts), boolean chains 9, 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.
D2 · Cognitive Complexity · InfoExtractor._parse_smil_formats (cognitive 42) · ×1
  • InfoExtractor._parse_smil_formats (cognitive 42) REDACTED:2095 — InfoExtractor._parse_smil_formats has cognitive complexity 42 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 4 (12 pts), boolean chains 11, 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.
D2 · Cognitive Complexity · NPOIE._get_info (cognitive 42) · ×1
  • NPOIE._get_info (cognitive 42) youtube_dl/extractor/npo.py:186 — NPOIE._get_info has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 6, loops 2 (6 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · utils.dfxp2srt (cognitive 42) · ×1
  • utils.dfxp2srt (cognitive 42) REDACTED:4970 — utils.dfxp2srt has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 7 (11 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · DailymotionIE._real_extract (cognitive 41) · ×1
  • DailymotionIE._real_extract (cognitive 41) REDACTED:206 — DailymotionIE._real_extract has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 9, ternaries 4 (7 pts), loops 5 (6 pts) (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.
D2 · Cognitive Complexity · GoogleDriveIE._real_extract (cognitive 41) · ×1
  • GoogleDriveIE._real_extract (cognitive 41) youtube_dl/extractor/googledrive.py:164 — GoogleDriveIE._real_extract has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MSNIE._real_extract (cognitive 41) · ×1
  • MSNIE._real_extract (cognitive 41) youtube_dl/extractor/msn.py:69 — MSNIE._real_extract has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 3 (5 pts), ternaries 1 (4 pts), 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.
D2 · Cognitive Complexity · YouNowChannelIE._entries (cognitive 41) · ×1
  • YouNowChannelIE._entries (cognitive 41) youtube_dl/extractor/younow.py:131 — YouNowChannelIE._entries has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (31 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BrightcoveLegacyIE._real_extract (cognitive 40) · ×1
  • BrightcoveLegacyIE._real_extract (cognitive 40) youtube_dl/extractor/brightcove.py:286 — BrightcoveLegacyIE._real_extract has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (36 pts), boolean chains 4 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DPlayIE._get_disco_api_info (cognitive 39) · ×1
  • DPlayIE._get_disco_api_info (cognitive 39) youtube_dl/extractor/dplay.py:187 — DPlayIE._get_disco_api_info has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (29 pts), boolean chains 5, loops 2 (3 pts), error handling 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.
D2 · Cognitive Complexity · VKIE._real_extract (cognitive 39) · ×1
  • VKIE._real_extract (cognitive 39) youtube_dl/extractor/vk.py:310 — VKIE._real_extract has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (29 pts), boolean chains 7, loops 2 (3 pts) (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.
D2 · Cognitive Complexity · YoutubeBaseInfoExtractor._login (cognitive 39) · ×1
  • YoutubeBaseInfoExtractor._login (cognitive 39) REDACTED:227 — YoutubeBaseInfoExtractor._login has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (32 pts), ternaries 2 (6 pts), 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.
D2 · Cognitive Complexity · DisneyIE._real_extract (cognitive 38) · ×1
  • DisneyIE._real_extract (cognitive 38) youtube_dl/extractor/disney.py:80 — DisneyIE._real_extract has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 7, loops 4 (6 pts), ternaries 1 (2 pts) (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.
D2 · Cognitive Complexity · HBOBaseIE._extract_info (cognitive 38) · ×1
  • HBOBaseIE._extract_info (cognitive 38) youtube_dl/extractor/hbo.py:56 — HBOBaseIE._extract_info has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 3 (7 pts), ternaries 1 (3 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · RteBaseIE._real_extract (cognitive 38) · ×1
  • RteBaseIE._real_extract (cognitive 38) youtube_dl/extractor/rte.py:20 — RteBaseIE._real_extract has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (30 pts), boolean chains 5, error handling 1 (2 pts), loops 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.
D2 · Cognitive Complexity · XTubeIE._real_extract (cognitive 38) · ×1
  • XTubeIE._real_extract (cognitive 38) youtube_dl/extractor/xtube.py:73 — XTubeIE._real_extract has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 4, loops 2 (4 pts), ternaries 1 (4 pts) (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.
D2 · Cognitive Complexity · ZypeIE._real_extract (cognitive 38) · ×1
  • ZypeIE._real_extract (cognitive 38) youtube_dl/extractor/zype.py:43 — ZypeIE._real_extract has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (29 pts), loops 3 (5 pts), boolean chains 3, error handling 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.
D2 · Cognitive Complexity · SixPlayIE._real_extract (cognitive 37) · ×1
  • SixPlayIE._real_extract (cognitive 37) youtube_dl/extractor/sixplay.py:43 — SixPlayIE._real_extract has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (24 pts), boolean chains 8, loops 2 (5 pts) (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DashSegmentsFD.real_download (cognitive 36) · ×1
  • DashSegmentsFD.real_download (cognitive 36) youtube_dl/downloader/dash.py:20 — DashSegmentsFD.real_download has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (22 pts), error handling 2 (6 pts), ternaries 2 (4 pts), loops 2 (3 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · RtmpFD.real_download (cognitive 36) · ×1
  • RtmpFD.real_download (cognitive 36) youtube_dl/downloader/rtmp.py:24 — RtmpFD.real_download has cognitive complexity 36 (threshold 15). Drivers by points: if/else 21 (25 pts), boolean chains 7, loops 2 (3 pts), error handling 1 (nesting depth added 5). 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BiliBiliIE._real_extract (cognitive 36) · ×1
  • BiliBiliIE._real_extract (cognitive 36) REDACTED:123 — BiliBiliIE._real_extract has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 6 (12 pts), ternaries 1 (4 pts), 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.
D2 · Cognitive Complexity · LecturioIE._real_extract (cognitive 36) · ×1
  • LecturioIE._real_extract (cognitive 36) youtube_dl/extractor/lecturio.py:105 — LecturioIE._real_extract has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 8, ternaries 3 (5 pts), loops 2 (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.
D2 · Cognitive Complexity · AfreecaTVIE._real_extract (cognitive 35) · ×1
  • AfreecaTVIE._real_extract (cognitive 35) youtube_dl/extractor/afreecatv.py:223 — AfreecaTVIE._real_extract has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (22 pts), ternaries 3 (8 pts), loops 2 (3 pts), boolean chains 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.
D2 · Cognitive Complexity · FranceTVIE._extract_video (cognitive 35) · ×1
  • FranceTVIE._extract_video (cognitive 35) youtube_dl/extractor/francetv.py:89 — FranceTVIE._extract_video has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 5, loops 3 (4 pts), ternaries 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.
D2 · Cognitive Complexity · YouPornListBase._entries (cognitive 34) · ×1
  • YouPornListBase._entries (cognitive 34) youtube_dl/extractor/youporn.py:280 — YouPornListBase._entries has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (27 pts), loops 3 (6 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · KonserthusetPlayIE._real_extract (cognitive 33) · ×1
  • KonserthusetPlayIE._real_extract (cognitive 33) youtube_dl/extractor/konserthusetplay.py:31 — KonserthusetPlayIE._real_extract has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 7, ternaries 2 (7 pts), loops 2 (4 pts) (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.
D2 · Cognitive Complexity · TVNowShowIE._real_extract (cognitive 33) · ×1
  • TVNowShowIE._real_extract (cognitive 33) youtube_dl/extractor/tvnow.py:444 — TVNowShowIE._real_extract has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 3 (7 pts), 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.
D2 · Cognitive Complexity · ArteTVIE._real_extract (cognitive 32) · ×1
  • ArteTVIE._real_extract (cognitive 32) youtube_dl/extractor/arte.py:52 — ArteTVIE._real_extract has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 7, loops 3 (6 pts), ternaries 1 (2 pts) (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.
D2 · Cognitive Complexity · InfoExtractor._parse_jwplayer_formats (cognitive 32) · ×1
  • InfoExtractor._parse_jwplayer_formats (cognitive 32) REDACTED:3111 — InfoExtractor._parse_jwplayer_formats has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 7, loops 1 (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.
D2 · Cognitive Complexity · NDREmbedBaseIE._real_extract (cognitive 32) · ×1
  • NDREmbedBaseIE._real_extract (cognitive 32) youtube_dl/extractor/ndr.py:235 — NDREmbedBaseIE._real_extract has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 8, loops 3 (4 pts), ternaries 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.
D2 · Cognitive Complexity · NprIE._real_extract (cognitive 32) · ×1
  • NprIE._real_extract (cognitive 32) REDACTED:58 — NprIE._real_extract has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 3 (5 pts), boolean chains 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.
D2 · Cognitive Complexity · OnetBaseIE._extract_from_id (cognitive 32) · ×1
  • OnetBaseIE._extract_from_id (cognitive 32) youtube_dl/extractor/onet.py:29 — OnetBaseIE._extract_from_id has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (6 pts), boolean chains 3, ternaries 2 (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.
D2 · Cognitive Complexity · XFileShareIE._real_extract (cognitive 32) · ×1
  • XFileShareIE._real_extract (cognitive 32) youtube_dl/extractor/xfileshare.py:196 — XFileShareIE._real_extract has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 5 (10 pts), boolean chains 5, ternaries 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.
D2 · Cognitive Complexity · FragmentFD._prepare_frag_download (cognitive 31) · ×1
  • FragmentFD._prepare_frag_download (cognitive 31) youtube_dl/downloader/fragment.py:133 — FragmentFD._prepare_frag_download has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (22 pts), ternaries 2 (5 pts), boolean chains 4 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ChaturbateIE._real_extract (cognitive 31) · ×1
  • ChaturbateIE._real_extract (cognitive 31) youtube_dl/extractor/chaturbate.py:38 — ChaturbateIE._real_extract has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 6 (10 pts), ternaries 1 (2 pts) (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.
D2 · Cognitive Complexity · HotStarIE._real_extract (cognitive 31) · ×1
  • HotStarIE._real_extract (cognitive 31) youtube_dl/extractor/hotstar.py:111 — HotStarIE._real_extract has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 8, loops 3, error handling 1 (2 pts), ternaries 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.
D2 · Cognitive Complexity · NineGagIE._real_extract (cognitive 31) · ×1
  • NineGagIE._real_extract (cognitive 31) youtube_dl/extractor/ninegag.py:39 — NineGagIE._real_extract has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3 (6 pts), ternaries 3 (5 pts), 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.
D2 · Cognitive Complexity · RaiBaseIE._extract_relinker_info (cognitive 31) · ×1
  • RaiBaseIE._extract_relinker_info (cognitive 31) youtube_dl/extractor/rai.py:36 — RaiBaseIE._extract_relinker_info has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 6, ternaries 2 (6 pts), loops 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.
D2 · Cognitive Complexity · URPlayIE._real_extract (cognitive 31) · ×1
  • URPlayIE._real_extract (cognitive 31) youtube_dl/extractor/urplay.py:54 — URPlayIE._real_extract has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 9, loops 3, ternaries 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.
D2 · Cognitive Complexity · YahooIE._extract_yahoo_video (cognitive 31) · ×1
  • YahooIE._extract_yahoo_video (cognitive 31) REDACTED:180 — YahooIE._extract_yahoo_video has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 6, loops 4 (6 pts), ternaries 3 (5 pts) (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.
D2 · Cognitive Complexity · ZattooPlatformBaseIE._extract_formats (cognitive 31) · ×1
  • ZattooPlatformBaseIE._extract_formats (cognitive 31) youtube_dl/extractor/zattoo.py:124 — ZattooPlatformBaseIE._extract_formats has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 3 (6 pts), ternaries 1 (3 pts) (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.
D2 · Cognitive Complexity · JSInterpreter._separate_at_op (cognitive 31) · ×1
  • JSInterpreter._separate_at_op (cognitive 31) youtube_dl/jsinterp.py:710 — JSInterpreter._separate_at_op has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (8 pts), ternaries 2 (5 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · AdultSwimIE._real_extract (cognitive 30) · ×1
  • AdultSwimIE._real_extract (cognitive 30) REDACTED:91 — AdultSwimIE._real_extract has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (5 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · GediDigitalIE._real_extract (cognitive 30) · ×1
  • GediDigitalIE._real_extract (cognitive 30) youtube_dl/extractor/gedidigital.py:97 — GediDigitalIE._real_extract has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (28 pts), boolean chains 1, loops 1 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · LyndaIE._real_extract (cognitive 30) · ×1
  • LyndaIE._real_extract (cognitive 30) youtube_dl/extractor/lynda.py:130 — LyndaIE._real_extract has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (7 pts), ternaries 2 (6 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · TvigleIE._real_extract (cognitive 30) · ×1
  • TvigleIE._real_extract (cognitive 30) youtube_dl/extractor/tvigle.py:56 — TvigleIE._real_extract has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 2 (4 pts), 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.
D2 · Cognitive Complexity · utils.decode_png (cognitive 30) · ×1
  • utils.decode_png (cognitive 30) REDACTED:6061 — utils.decode_png has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 4 (5 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · YoutubeDL._match_entry (cognitive 29) · ×1
  • YoutubeDL._match_entry (cognitive 29) youtube_dl/YoutubeDL.py:793 — YoutubeDL._match_entry has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (27 pts), 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.
D2 · Cognitive Complexity · CCMAIE._real_extract (cognitive 29) · ×1
  • CCMAIE._real_extract (cognitive 29) youtube_dl/extractor/ccma.py:63 — CCMAIE._real_extract has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4, loops 2 (3 pts), ternaries 2 (3 pts), 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.
D2 · Cognitive Complexity · InfoExtractor._initialize_geo_bypass (cognitive 29) · ×1
  • InfoExtractor._initialize_geo_bypass (cognitive 29) REDACTED:480 — InfoExtractor._initialize_geo_bypass has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 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.
D2 · Cognitive Complexity · FirstTVIE._real_extract (cognitive 29) · ×1
  • FirstTVIE._real_extract (cognitive 29) youtube_dl/extractor/firsttv.py:62 — FirstTVIE._real_extract has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 8, loops 2 (3 pts) (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.
D2 · Cognitive Complexity · ImgGamingBaseIE._real_extract (cognitive 29) · ×1
  • ImgGamingBaseIE._real_extract (cognitive 29) youtube_dl/extractor/imggaming.py:64 — ImgGamingBaseIE._real_extract has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 4 (7 pts), ternaries 1 (3 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · IviIE._real_extract (cognitive 29) · ×1
  • IviIE._real_extract (cognitive 29) youtube_dl/extractor/ivi.py:83 — IviIE._real_extract has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 4, error handling 1 (3 pts), loops 2, ternaries 2 (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.
D2 · Cognitive Complexity · SohuIE._real_extract (cognitive 29) · ×1
  • SohuIE._real_extract (cognitive 29) youtube_dl/extractor/sohu.py:87 — SohuIE._real_extract has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 4 (7 pts), ternaries 1 (2 pts) (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.
D2 · Cognitive Complexity · ToggleIE._real_extract (cognitive 29) · ×1
  • ToggleIE._real_extract (cognitive 29) youtube_dl/extractor/toggle.py:90 — ToggleIE._real_extract has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 4 (7 pts), boolean chains 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.
D2 · Cognitive Complexity · utils.write_xattr (cognitive 29) · ×1
  • utils.write_xattr (cognitive 29) REDACTED:6166 — utils.write_xattr has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), error handling 4 (9 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · YoutubeDL.process_ie_result (cognitive 28) · ×1
  • YoutubeDL.process_ie_result (cognitive 28) youtube_dl/YoutubeDL.py:1001 — YoutubeDL.process_ie_result has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 4, loops 1 (2 pts) (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.
D2 · Cognitive Complexity · AMPIE._extract_feed_info (cognitive 28) · ×1
  • AMPIE._extract_feed_info (cognitive 28) youtube_dl/extractor/amp.py:18 — AMPIE._extract_feed_info has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 3 (5 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · InfoExtractor._request_webpage (cognitive 28) · ×1
  • InfoExtractor._request_webpage (cognitive 28) REDACTED:647 — InfoExtractor._request_webpage has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (26 pts), 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.
D2 · Cognitive Complexity · LEGOIE._real_extract (cognitive 28) · ×1
  • LEGOIE._real_extract (cognitive 28) youtube_dl/extractor/lego.py:66 — LEGOIE._real_extract has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6, loops 2 (4 pts), 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.
D2 · Cognitive Complexity · LinuxAcademyIE._real_extract (cognitive 28) · ×1
  • LinuxAcademyIE._real_extract (cognitive 28) youtube_dl/extractor/linuxacademy.py:154 — LinuxAcademyIE._real_extract has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 6, ternaries 2 (5 pts), loops 1 (2 pts) (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.
D2 · Cognitive Complexity · MDRIE._real_extract (cognitive 28) · ×1
  • MDRIE._real_extract (cognitive 28) youtube_dl/extractor/mdr.py:102 — MDRIE._real_extract has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (22 pts), boolean chains 3, loops 2 (3 pts) (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.
D2 · Cognitive Complexity · RTBFIE._real_extract (cognitive 28) · ×1
  • RTBFIE._real_extract (cognitive 28) youtube_dl/extractor/rtbf.py:70 — RTBFIE._real_extract has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 6, loops 3 (5 pts), ternaries 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.
D2 · Cognitive Complexity · SRGSSRIE._real_extract (cognitive 28) · ×1
  • SRGSSRIE._real_extract (cognitive 28) youtube_dl/extractor/srgssr.py:84 — SRGSSRIE._real_extract has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 4 (7 pts), boolean chains 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.
D2 · Cognitive Complexity · TeamcocoIE._real_extract (cognitive 28) · ×1
  • TeamcocoIE._real_extract (cognitive 28) youtube_dl/extractor/teamcoco.py:110 — TeamcocoIE._real_extract has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 1 (2 pts), boolean chains 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.
D2 · Cognitive Complexity · WDRIE._real_extract (cognitive 28) · ×1
  • WDRIE._real_extract (cognitive 28) youtube_dl/extractor/wdr.py:44 — WDRIE._real_extract has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 3 (5 pts), boolean chains 1, ternaries 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.
D2 · Cognitive Complexity · WistiaBaseIE._extract_media (cognitive 28) · ×1
  • WistiaBaseIE._extract_media (cognitive 28) youtube_dl/extractor/wistia.py:33 — WistiaBaseIE._extract_media has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 5, ternaries 1 (3 pts), loops 2 (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.
D2 · Cognitive Complexity · ARDMediathekIE._real_extract (cognitive 27) · ×1
  • ARDMediathekIE._real_extract (cognitive 27) youtube_dl/extractor/ard.py:161 — ARDMediathekIE._real_extract has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 2 (5 pts), loops 2 (3 pts), 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.
D2 · Cognitive Complexity · CuriosityStreamIE._real_extract (cognitive 27) · ×1
  • CuriosityStreamIE._real_extract (cognitive 27) youtube_dl/extractor/curiositystream.py:68 — CuriosityStreamIE._real_extract has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 4 (7 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · HitboxLiveIE._real_extract (cognitive 27) · ×1
  • HitboxLiveIE._real_extract (cognitive 27) youtube_dl/extractor/hitbox.py:160 — HitboxLiveIE._real_extract has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 2 (4 pts), 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.
D2 · Cognitive Complexity · PBSIE._extract_webpage (cognitive 27) · ×1
  • PBSIE._extract_webpage (cognitive 27) youtube_dl/extractor/pbs.py:438 — PBSIE._extract_webpage has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 2 (4 pts), 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.
D2 · Cognitive Complexity · SpankwireIE._real_extract (cognitive 27) · ×1
  • SpankwireIE._real_extract (cognitive 27) youtube_dl/extractor/spankwire.py:76 — SpankwireIE._real_extract has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 2 (3 pts), ternaries 1 (3 pts), 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.
D2 · Cognitive Complexity · TwitchPlaylistBaseIE._entries (cognitive 27) · ×1
  • TwitchPlaylistBaseIE._entries (cognitive 27) REDACTED:428 — TwitchPlaylistBaseIE._entries has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 2 (3 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · VevoIE._real_extract (cognitive 27) · ×1
  • VevoIE._real_extract (cognitive 27) youtube_dl/extractor/vevo.py:191 — VevoIE._real_extract has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 2, loops 2, ternaries 2 (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.
D2 · Cognitive Complexity · VRVIE._real_extract (cognitive 27) · ×1
  • VRVIE._real_extract (cognitive 27) youtube_dl/extractor/vrv.py:167 — VRVIE._real_extract has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 6 (11 pts), boolean chains 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.
D2 · Cognitive Complexity · ZingMp3BaseIE._extract_item (cognitive 27) · ×1
  • ZingMp3BaseIE._extract_item (cognitive 27) youtube_dl/extractor/zingmp3.py:15 — ZingMp3BaseIE._extract_item has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 4, loops 2 (4 pts) (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.
D2 · Cognitive Complexity · utils._match_one (cognitive 27) · ×1
  • utils._match_one (cognitive 27) REDACTED:4866 — utils._match_one has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 3, error handling 1 (3 pts) (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.
D2 · Cognitive Complexity · YoutubeDL.__process_playlist (cognitive 26) · ×1
  • YoutubeDL.__process_playlist (cognitive 26) youtube_dl/YoutubeDL.py:1108 — YoutubeDL.__process_playlist has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (19 pts), loops 2 (4 pts), ternaries 1 (2 pts), 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.
D2 · Cognitive Complexity · YoutubeDL.process_subtitles (cognitive 26) · ×1
  • YoutubeDL.process_subtitles (cognitive 26) youtube_dl/YoutubeDL.py:1872 — YoutubeDL.process_subtitles has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (5 pts), boolean chains 4, ternaries 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.
D2 · Cognitive Complexity · PeerTubeIE._real_extract (cognitive 26) · ×1
  • PeerTubeIE._real_extract (cognitive 26) youtube_dl/extractor/peertube.py:531 — PeerTubeIE._real_extract has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5, ternaries 2 (3 pts), loops 2 (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.
D2 · Cognitive Complexity · PinterestBaseIE._extract_video (cognitive 26) · ×1
  • PinterestBaseIE._extract_video (cognitive 26) youtube_dl/extractor/pinterest.py:29 — PinterestBaseIE._extract_video has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 4, loops 2 (4 pts) (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.
D2 · Cognitive Complexity · YandexDiskIE._real_extract (cognitive 26) · ×1
  • YandexDiskIE._real_extract (cognitive 26) youtube_dl/extractor/yandexdisk.py:59 — YandexDiskIE._real_extract has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 10, 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.
D2 · Cognitive Complexity · YoutubeDLHandler.http_response (cognitive 26) · ×1
  • YoutubeDLHandler.http_response (cognitive 26) REDACTED:2789 — YoutubeDLHandler.http_response has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 2 (3 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · YoutubeDLCookieJar.save (cognitive 26) · ×1
  • YoutubeDLCookieJar.save (cognitive 26) REDACTED:2951 — YoutubeDLCookieJar.save has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 2, loops 2 (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.
D2 · Cognitive Complexity · utils.parse_codecs (cognitive 26) · ×1
  • utils.parse_codecs (cognitive 26) REDACTED:4742 — utils.parse_codecs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 4, ternaries 3 (4 pts), loops 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.
D2 · Cognitive Complexity · FileDownloader.report_progress (cognitive 25) · ×1
  • FileDownloader.report_progress (cognitive 25) youtube_dl/downloader/common.py:259 — FileDownloader.report_progress has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · InfoExtractor._parse_jwplayer_data (cognitive 25) · ×1
  • InfoExtractor._parse_jwplayer_data (cognitive 25) REDACTED:3037 — InfoExtractor._parse_jwplayer_data has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (2 pts) (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.
D2 · Cognitive Complexity · CoubIE._real_extract (cognitive 25) · ×1
  • CoubIE._real_extract (cognitive 25) youtube_dl/extractor/coub.py:46 — CoubIE._real_extract has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 2 (5 pts), loops 2 (3 pts), 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.
D2 · Cognitive Complexity · GloboIE._real_extract (cognitive 25) · ×1
  • GloboIE._real_extract (cognitive 25) REDACTED:93 — GloboIE._real_extract has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 7, ternaries 1 (2 pts), 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.
D2 · Cognitive Complexity · MediasiteIE._real_extract (cognitive 25) · ×1
  • MediasiteIE._real_extract (cognitive 25) youtube_dl/extractor/mediasite.py:125 — MediasiteIE._real_extract has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (6 pts), ternaries 1 (3 pts) (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.
D2 · Cognitive Complexity · RedTubeIE._real_extract (cognitive 25) · ×1
  • RedTubeIE._real_extract (cognitive 25) youtube_dl/extractor/redtube.py:45 — RedTubeIE._real_extract has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, loops 3 (5 pts) (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.
D2 · Cognitive Complexity · SVTBaseIE._extract_video (cognitive 25) · ×1
  • SVTBaseIE._extract_video (cognitive 25) youtube_dl/extractor/svt.py:22 — SVTBaseIE._extract_video has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, loops 2 (3 pts), ternaries 2 (3 pts) (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.
D2 · Cognitive Complexity · YoutubeDL.trouble (cognitive 24) · ×1
  • YoutubeDL.trouble (cognitive 24) youtube_dl/YoutubeDL.py:610 — YoutubeDL.trouble has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 3, boolean chains 2 (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.
D2 · Cognitive Complexity · YoutubeDL._calc_headers (cognitive 24) · ×1
  • YoutubeDL._calc_headers (cognitive 24) youtube_dl/YoutubeDL.py:1578 — YoutubeDL._calc_headers has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (5 pts), ternaries 1 (5 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · IsmFD.real_download (cognitive 24) · ×1
  • IsmFD.real_download (cognitive 24) youtube_dl/downloader/ism.py:213 — IsmFD.real_download has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (17 pts), error handling 1 (3 pts), loops 2 (3 pts), ternaries 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.
D2 · Cognitive Complexity · AppleTrailersIE._real_extract (cognitive 24) · ×1
  • AppleTrailersIE._real_extract (cognitive 24) youtube_dl/extractor/appletrailers.py:96 — AppleTrailersIE._real_extract has cognitive complexity 24 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 4 (10 pts), boolean chains 2 (nesting depth added 13). 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.
D2 · Cognitive Complexity · CamModelsIE._real_extract (cognitive 24) · ×1
  • CamModelsIE._real_extract (cognitive 24) youtube_dl/extractor/cammodels.py:19 — CamModelsIE._real_extract has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 2 (3 pts) (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.
D2 · Cognitive Complexity · DVTVIE._parse_video_metadata (cognitive 24) · ×1
  • DVTVIE._parse_video_metadata (cognitive 24) youtube_dl/extractor/dvtv.py:115 — DVTVIE._parse_video_metadata has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (7 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · HKETVIE._real_extract (cognitive 24) · ×1
  • HKETVIE._real_extract (cognitive 24) youtube_dl/extractor/hketv.py:74 — HKETVIE._real_extract has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 6, loops 2, ternaries 1 (2 pts) (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.
D2 · Cognitive Complexity · ITVIE._real_extract (cognitive 24) · ×1
  • ITVIE._real_extract (cognitive 24) youtube_dl/extractor/itv.py:180 — ITVIE._real_extract has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 9, loops 3, ternaries 2 (nesting depth added 3). 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.
D2 · Cognitive Complexity · KinjaEmbedIE._real_extract (cognitive 24) · ×1
  • KinjaEmbedIE._real_extract (cognitive 24) youtube_dl/extractor/kinja.py:131 — KinjaEmbedIE._real_extract has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 4, loops 1 (2 pts) (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.
D2 · Cognitive Complexity · MTVServicesInfoExtractor._extract_video_formats (cognitive 24) · ×1
  • MTVServicesInfoExtractor._extract_video_formats (cognitive 24) youtube_dl/extractor/mtv.py:71 — MTVServicesInfoExtractor._extract_video_formats has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (6 pts), error handling 1 (3 pts), boolean chains 1, 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.
D2 · Cognitive Complexity · NexxIE._extract_azure_formats (cognitive 24) · ×1
  • NexxIE._extract_azure_formats (cognitive 24) REDACTED:223 — NexxIE._extract_azure_formats has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 1 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · NRKTVSeriesIE._real_extract (cognitive 24) · ×1
  • NRKTVSeriesIE._real_extract (cognitive 24) youtube_dl/extractor/nrk.py:693 — NRKTVSeriesIE._real_extract has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 6, loops 2 (4 pts), 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.
D2 · Cognitive Complexity · VGTVIE._real_extract (cognitive 24) · ×1
  • VGTVIE._real_extract (cognitive 24) youtube_dl/extractor/vgtv.py:167 — VGTVIE._real_extract has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2 (4 pts), ternaries 3 (4 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · EmbedThumbnailPP.run (cognitive 24) · ×1
  • EmbedThumbnailPP.run (cognitive 24) youtube_dl/postprocessor/embedthumbnail.py:33 — EmbedThumbnailPP.run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (23 pts), 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.
D2 · Cognitive Complexity · FFmpegPostProcessor._determine_executables (cognitive 24) · ×1
  • FFmpegPostProcessor._determine_executables (cognitive 24) youtube_dl/postprocessor/ffmpeg.py:76 — FFmpegPostProcessor._determine_executables has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · InfoExtractor._extract_akamai_formats (cognitive 23) · ×1
  • InfoExtractor._extract_akamai_formats (cognitive 23) REDACTED:2911 — InfoExtractor._extract_akamai_formats has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (9 pts), ternaries 1 (2 pts), 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.
D2 · Cognitive Complexity · CorusIE._real_extract (cognitive 23) · ×1
  • CorusIE._real_extract (cognitive 23) youtube_dl/extractor/corus.py:98 — CorusIE._real_extract has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 2 (4 pts), boolean chains 2, loops 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.
D2 · Cognitive Complexity · FusionIE._real_extract (cognitive 23) · ×1
  • FusionIE._real_extract (cognitive 23) youtube_dl/extractor/fusion.py:38 — FusionIE._real_extract has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (8 pts), boolean chains 3, loops 2 (3 pts) (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.
D2 · Cognitive Complexity · MedalTVIE._real_extract (cognitive 23) · ×1
  • MedalTVIE._real_extract (cognitive 23) youtube_dl/extractor/medaltv.py:53 — MedalTVIE._real_extract has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, ternaries 3 (5 pts), 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.
D2 · Cognitive Complexity · OoyalaBaseIE._extract (cognitive 23) · ×1
  • OoyalaBaseIE._extract (cognitive 23) youtube_dl/extractor/ooyala.py:26 — OoyalaBaseIE._extract has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (10 pts), loops 2 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ServusIE._real_extract (cognitive 23) · ×1
  • ServusIE._real_extract (cognitive 23) REDACTED:63 — ServusIE._real_extract has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 9, loops 2 (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.
D2 · Cognitive Complexity · TeamTreeHouseIE._real_extract (cognitive 23) · ×1
  • TeamTreeHouseIE._real_extract (cognitive 23) youtube_dl/extractor/teamtreehouse.py:73 — TeamTreeHouseIE._real_extract has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (9 pts) (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.
D2 · Cognitive Complexity · TVNowBaseIE._extract_video (cognitive 23) · ×1
  • TVNowBaseIE._extract_video (cognitive 23) youtube_dl/extractor/tvnow.py:30 — TVNowBaseIE._extract_video has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (7 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · UMGDeIE._real_extract (cognitive 23) · ×1
  • UMGDeIE._real_extract (cognitive 23) youtube_dl/extractor/umg.py:28 — UMGDeIE._real_extract has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (3 pts), boolean chains 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.
D2 · Cognitive Complexity · VideomoreIE._real_extract (cognitive 23) · ×1
  • VideomoreIE._real_extract (cognitive 23) youtube_dl/extractor/videomore.py:147 — VideomoreIE._real_extract has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (4 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · YoutubeTabIE._grid_entries (cognitive 23) · ×1
  • YoutubeTabIE._grid_entries (cognitive 23) REDACTED:3576 — YoutubeTabIE._grid_entries has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (4 pts) (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.
D2 · Cognitive Complexity · prepare_manpage.filter_options (cognitive 22) · ×1
  • prepare_manpage.filter_options (cognitive 22) devscripts/prepare_manpage.py:43 — prepare_manpage.filter_options has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · YoutubeDL.__init__ (cognitive 22) · ×1
  • YoutubeDL.__init__ (cognitive 22) youtube_dl/YoutubeDL.py:378 — YoutubeDL.__init__ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 2 (4 pts), loops 2, boolean chains 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.
D2 · Cognitive Complexity · YoutubeDL._format_note (cognitive 22) · ×1
  • YoutubeDL._format_note (cognitive 22) youtube_dl/YoutubeDL.py:2406 — YoutubeDL._format_note has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 8, ternaries 4 (5 pts) (nesting depth added 2). 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CanvasIE._real_extract (cognitive 22) · ×1
  • CanvasIE._real_extract (cognitive 22) youtube_dl/extractor/canvas.py:49 — CanvasIE._real_extract has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, loops 2 (3 pts) (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.
D2 · Cognitive Complexity · DiscoveryGoBaseIE._extract_video_info (cognitive 22) · ×1
  • DiscoveryGoBaseIE._extract_video_info (cognitive 22) youtube_dl/extractor/discoverygo.py:31 — DiscoveryGoBaseIE._extract_video_info has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2 (5 pts), loops 2 (3 pts), 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.
D2 · Cognitive Complexity · MediasetIE._real_extract (cognitive 22) · ×1
  • MediasetIE._real_extract (cognitive 22) youtube_dl/extractor/mediaset.py:134 — MediasetIE._real_extract has cognitive complexity 22 (threshold 15). Drivers by points: loops 4 (7 pts), if/else 3 (6 pts), ternaries 1 (4 pts), error handling 1 (3 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · MicrosoftVirtualAcademyIE._real_extract (cognitive 22) · ×1
  • MicrosoftVirtualAcademyIE._real_extract (cognitive 22) youtube_dl/extractor/microsoftvirtualacademy.py:55 — MicrosoftVirtualAcademyIE._real_extract has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (4 pts), boolean chains 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.
D2 · Cognitive Complexity · NHLBaseIE._real_extract (cognitive 22) · ×1
  • NHLBaseIE._real_extract (cognitive 22) youtube_dl/extractor/nhl.py:16 — NHLBaseIE._real_extract has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 2 (4 pts), loops 2, 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.
D2 · Cognitive Complexity · PornHubPagedPlaylistBaseIE._entries (cognitive 22) · ×1
  • PornHubPagedPlaylistBaseIE._entries (cognitive 22) REDACTED:584 — PornHubPagedPlaylistBaseIE._entries has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (4 pts), loops 2 (3 pts), boolean chains 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.
D2 · Cognitive Complexity · TelecincoIE._real_extract (cognitive 22) · ×1
  • TelecincoIE._real_extract (cognitive 22) youtube_dl/extractor/telecinco.py:118 — TelecincoIE._real_extract has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 3, loops 1 (2 pts) (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.
D2 · Cognitive Complexity · TVPlayIE._real_extract (cognitive 22) · ×1
  • TVPlayIE._real_extract (cognitive 22) youtube_dl/extractor/tvplay.py:236 — TVPlayIE._real_extract has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · UdemyCourseIE._real_extract (cognitive 22) · ×1
  • UdemyCourseIE._real_extract (cognitive 22) youtube_dl/extractor/udemy.py:437 — UdemyCourseIE._real_extract has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (20 pts), 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.
D2 · Cognitive Complexity · UOLIE._real_extract (cognitive 22) · ×1
  • UOLIE._real_extract (cognitive 22) youtube_dl/extractor/uol.py:67 — UOLIE._real_extract has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 5 (8 pts), 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.
D2 · Cognitive Complexity · options.parseOpts (cognitive 22) · ×1
  • options.parseOpts (cognitive 22) youtube_dl/options.py:42 — options.parseOpts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 1 (3 pts), ternaries 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.
D2 · Cognitive Complexity · BrightcoveNewIE._real_extract (cognitive 21) · ×1
  • BrightcoveNewIE._real_extract (cognitive 21) youtube_dl/extractor/brightcove.py:589 — BrightcoveNewIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, error handling 1 (2 pts), 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.
D2 · Cognitive Complexity · CondeNastIE._extract_video (cognitive 21) · ×1
  • CondeNastIE._extract_video (cognitive 21) youtube_dl/extractor/condenast.py:143 — CondeNastIE._extract_video has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 2 (4 pts), boolean chains 2, loops 2 (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.
D2 · Cognitive Complexity · DailymotionBaseInfoExtractor._call_api (cognitive 21) · ×1
  • DailymotionBaseInfoExtractor._call_api (cognitive 21) REDACTED:48 — DailymotionBaseInfoExtractor._call_api has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 2 (4 pts), error handling 1 (3 pts), 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.
D2 · Cognitive Complexity · MailRuIE._real_extract (cognitive 21) · ×1
  • MailRuIE._real_extract (cognitive 21) youtube_dl/extractor/mailru.py:99 — MailRuIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, ternaries 2 (3 pts), loops 1 (nesting depth added 4). 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.
D2 · Cognitive Complexity · NBABaseIE._extract_video (cognitive 21) · ×1
  • NBABaseIE._extract_video (cognitive 21) youtube_dl/extractor/nba.py:277 — NBABaseIE._extract_video has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, 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.
D2 · Cognitive Complexity · OdnoklassnikiIE._real_extract (cognitive 21) · ×1
  • OdnoklassnikiIE._real_extract (cognitive 21) youtube_dl/extractor/odnoklassniki.py:133 — OdnoklassnikiIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (17 pts), ternaries 2 (3 pts), loops 1 (nesting depth added 4). 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PlayvidIE._real_extract (cognitive 21) · ×1
  • PlayvidIE._real_extract (cognitive 21) youtube_dl/extractor/playvid.py:41 — PlayvidIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 1 (4 pts), 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.
D2 · Cognitive Complexity · RICEIE._real_extract (cognitive 21) · ×1
  • RICEIE._real_extract (cognitive 21) youtube_dl/extractor/rice.py:32 — RICEIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2, 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.
D2 · Cognitive Complexity · RTVEALaCartaIE._decrypt_url (cognitive 21) · ×1
  • RTVEALaCartaIE._decrypt_url (cognitive 21) youtube_dl/extractor/rtve.py:80 — RTVEALaCartaIE._decrypt_url has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (7 pts) (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.
D2 · Cognitive Complexity · RUTVIE._real_extract (cognitive 21) · ×1
  • RUTVIE._real_extract (cognitive 21) youtube_dl/extractor/rutv.py:126 — RUTVIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 3 (5 pts), loops 2 (3 pts) (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.
D2 · Cognitive Complexity · SevenPlusIE._real_extract (cognitive 21) · ×1
  • SevenPlusIE._real_extract (cognitive 21) youtube_dl/extractor/sevenplus.py:45 — SevenPlusIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (5 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · SVTSeriesIE._real_extract (cognitive 21) · ×1
  • SVTSeriesIE._real_extract (cognitive 21) youtube_dl/extractor/svt.py:303 — SVTSeriesIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 5, loops 2 (3 pts) (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.
D2 · Cognitive Complexity · VidmeIE._real_extract (cognitive 21) · ×1
  • VidmeIE._real_extract (cognitive 21) youtube_dl/extractor/vidme.py:135 — VidmeIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1, loops 1 (nesting depth added 5). 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.
D2 · Cognitive Complexity · VoxMediaVolumeIE._real_extract (cognitive 21) · ×1
  • VoxMediaVolumeIE._real_extract (cognitive 21) youtube_dl/extractor/voxmedia.py:18 — VoxMediaVolumeIE._real_extract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7, ternaries 1 (3 pts), loops 1 (nesting depth added 5). 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.
D2 · Cognitive Complexity · OnDemandPagedList.getslice (cognitive 21) · ×1
  • OnDemandPagedList.getslice (cognitive 21) REDACTED:4162 — OnDemandPagedList.getslice has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 2 (4 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · CONtvIE._real_extract (cognitive 20) · ×1
  • CONtvIE._real_extract (cognitive 20) youtube_dl/extractor/contv.py:36 — CONtvIE._real_extract has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 5 (8 pts), 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.
D2 · Cognitive Complexity · HiDiveIE._real_extract (cognitive 20) · ×1
  • HiDiveIE._real_extract (cognitive 20) youtube_dl/extractor/hidive.py:57 — HiDiveIE._real_extract has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 2 (3 pts) (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.
D2 · Cognitive Complexity · MindsIE._real_extract (cognitive 20) · ×1
  • MindsIE._real_extract (cognitive 20) youtube_dl/extractor/minds.py:71 — MindsIE._real_extract has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, loops 1, ternaries 1 (nesting depth added 3). 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.
D2 · Cognitive Complexity · MixcloudIE._real_extract (cognitive 20) · ×1
  • MixcloudIE._real_extract (cognitive 20) youtube_dl/extractor/mixcloud.py:99 — MixcloudIE._real_extract has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 7, loops 3 (nesting depth added 4). 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.
D2 · Cognitive Complexity · NownessBaseIE._extract_url_result (cognitive 20) · ×1
  • NownessBaseIE._extract_url_result (cognitive 20) youtube_dl/extractor/nowness.py:17 — NownessBaseIE._extract_url_result has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PyvideoIE._real_extract (cognitive 20) · ×1
  • PyvideoIE._real_extract (cognitive 20) youtube_dl/extractor/pyvideo.py:29 — PyvideoIE._real_extract has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts), 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.
D2 · Cognitive Complexity · RoosterTeethIE._real_extract (cognitive 20) · ×1
  • RoosterTeethIE._real_extract (cognitive 20) youtube_dl/extractor/roosterteeth.py:84 — RoosterTeethIE._real_extract has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 4, loops 2 (4 pts), 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.
D2 · Cognitive Complexity · ThePlatformIE._real_extract (cognitive 20) · ×1
  • ThePlatformIE._real_extract (cognitive 20) youtube_dl/extractor/theplatform.py:235 — ThePlatformIE._real_extract has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 1 (2 pts), ternaries 1 (2 pts) (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.
D2 · Cognitive Complexity · ZDFBaseIE._extract_ptmd (cognitive 20) · ×1
  • ZDFBaseIE._extract_ptmd (cognitive 20) youtube_dl/extractor/zdf.py:95 — ZDFBaseIE._extract_ptmd has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (9 pts), boolean chains 1 (nesting depth added 12). 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.
D2 · Cognitive Complexity · LazyList.__getitem__ (cognitive 20) · ×1
  • LazyList.__getitem__ (cognitive 20) REDACTED:4094 — LazyList.__getitem__ has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (8 pts), error handling 2 (3 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AparatIE._real_extract (cognitive 19) · ×1
  • AparatIE._real_extract (cognitive 19) youtube_dl/extractor/aparat.py:36 — AparatIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 2 (3 pts) (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.
D2 · Cognitive Complexity · ARDIE._real_extract (cognitive 19) · ×1
  • ARDIE._real_extract (cognitive 19) youtube_dl/extractor/ard.py:283 — ARDIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (4 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · CiscoLiveSearchIE._entries (cognitive 19) · ×1
  • CiscoLiveSearchIE._entries (cognitive 19) REDACTED:120 — CiscoLiveSearchIE._entries has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), 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.
D2 · Cognitive Complexity · EaglePlatformIE._real_extract (cognitive 19) · ×1
  • EaglePlatformIE._real_extract (cognitive 19) youtube_dl/extractor/eagleplatform.py:123 — EaglePlatformIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (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.
D2 · Cognitive Complexity · EpornerIE._real_extract (cognitive 19) · ×1
  • EpornerIE._real_extract (cognitive 19) youtube_dl/extractor/eporner.py:53 — EpornerIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 2 (3 pts) (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.
D2 · Cognitive Complexity · FunimationIE._real_extract (cognitive 19) · ×1
  • FunimationIE._real_extract (cognitive 19) youtube_dl/extractor/funimation.py:81 — FunimationIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7, error handling 1, loops 1 (nesting depth added 3). 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.
D2 · Cognitive Complexity · IPrimaIE._real_extract (cognitive 19) · ×1
  • IPrimaIE._real_extract (cognitive 19) youtube_dl/extractor/iprima.py:74 — IPrimaIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (7 pts), 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.
D2 · Cognitive Complexity · KeezMoviesIE._extract_info (cognitive 19) · ×1
  • KeezMoviesIE._extract_info (cognitive 19) youtube_dl/extractor/keezmovies.py:37 — KeezMoviesIE._extract_info has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1 (2 pts), error handling 1, ternaries 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.
D2 · Cognitive Complexity · ManyVidsIE._real_extract (cognitive 19) · ×1
  • ManyVidsIE._real_extract (cognitive 19) youtube_dl/extractor/manyvids.py:47 — ManyVidsIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, loops 2, error handling 1 (nesting depth added 5). 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.
D2 · Cognitive Complexity · NetEaseMusicBaseIE.extract_formats (cognitive 19) · ×1
  • NetEaseMusicBaseIE.extract_formats (cognitive 19) REDACTED:113 — NetEaseMusicBaseIE.extract_formats has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 2 (3 pts) (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.
D2 · Cognitive Complexity · ORFONBase._extract_video (cognitive 19) · ×1
  • ORFONBase._extract_video (cognitive 19) youtube_dl/extractor/orf.py:531 — ORFONBase._extract_video has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts), ternaries 1 (2 pts), 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.
D2 · Cognitive Complexity · PatreonIE._real_extract (cognitive 19) · ×1
  • PatreonIE._real_extract (cognitive 19) youtube_dl/extractor/patreon.py:95 — PatreonIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, 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.
D2 · Cognitive Complexity · RaiPlayPlaylistIE._real_extract (cognitive 19) · ×1
  • RaiPlayPlaylistIE._real_extract (cognitive 19) youtube_dl/extractor/rai.py:365 — RaiPlayPlaylistIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (6 pts), boolean chains 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.
D2 · Cognitive Complexity · SkyBaseIE._process_ooyala_element (cognitive 19) · ×1
  • SkyBaseIE._process_ooyala_element (cognitive 19) youtube_dl/extractor/sky.py:19 — SkyBaseIE._process_ooyala_element has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 4 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · VideaIE._real_extract (cognitive 19) · ×1
  • VideaIE._real_extract (cognitive 19) REDACTED:128 — VideaIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 2 (4 pts), boolean chains 3, loops 2 (nesting depth added 4). 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.
D2 · Cognitive Complexity · YahooIE._real_extract (cognitive 19) · ×1
  • YahooIE._real_extract (cognitive 19) REDACTED:276 — YahooIE._real_extract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 1 (2 pts) (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.
D2 · Cognitive Complexity · FFmpegPostProcessor.get_audio_codec (cognitive 19) · ×1
  • FFmpegPostProcessor.get_audio_codec (cognitive 19) youtube_dl/postprocessor/ffmpeg.py:157 — FFmpegPostProcessor.get_audio_codec has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, loops 1 (2 pts), ternaries 2, error handling 1 (nesting depth added 4). 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ADNIE._get_subtitles (cognitive 18) · ×1
  • ADNIE._get_subtitles (cognitive 18) youtube_dl/extractor/adn.py:79 — ADNIE._get_subtitles has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (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.
D2 · Cognitive Complexity · BRMediathekIE._real_extract (cognitive 18) · ×1
  • BRMediathekIE._real_extract (cognitive 18) youtube_dl/extractor/br.py:194 — BRMediathekIE._real_extract has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (5 pts) (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.
D2 · Cognitive Complexity · InfoExtractor._search_regex (cognitive 18) · ×1
  • InfoExtractor._search_regex (cognitive 18) REDACTED:1063 — InfoExtractor._search_regex has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 1 (2 pts), boolean chains 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.
D2 · Cognitive Complexity · ImgurIE._real_extract (cognitive 18) · ×1
  • ImgurIE._real_extract (cognitive 18) youtube_dl/extractor/imgur.py:95 — ImgurIE._real_extract has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 3 (nesting depth added 3). 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · KakaoIE._real_extract (cognitive 18) · ×1
  • KakaoIE._real_extract (cognitive 18) youtube_dl/extractor/kakao.py:53 — KakaoIE._real_extract has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), boolean chains 4, error handling 2 (4 pts), 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.
D2 · Cognitive Complexity · MLBBaseIE._real_extract (cognitive 18) · ×1
  • MLBBaseIE._real_extract (cognitive 18) youtube_dl/extractor/mlb.py:16 — MLBBaseIE._real_extract has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 2 (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.
D2 · Cognitive Complexity · MTVServicesInfoExtractor._get_video_info (cognitive 18) · ×1
  • MTVServicesInfoExtractor._get_video_info (cognitive 18) youtube_dl/extractor/mtv.py:132 — MTVServicesInfoExtractor._get_video_info has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 4). 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.
D2 · Cognitive Complexity · PuhuTVSerieIE._extract_entries (cognitive 18) · ×1
  • PuhuTVSerieIE._extract_entries (cognitive 18) youtube_dl/extractor/puhutv.py:195 — PuhuTVSerieIE._extract_entries has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (7 pts), 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.
D2 · Cognitive Complexity · RayWenderlichIE._extract_video_id (cognitive 18) · ×1
  • RayWenderlichIE._extract_video_id (cognitive 18) youtube_dl/extractor/raywenderlich.py:54 — RayWenderlichIE._extract_video_id has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · TeachableIE._real_extract (cognitive 18) · ×1
  • TeachableIE._real_extract (cognitive 18) youtube_dl/extractor/teachable.py:153 — TeachableIE._real_extract has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (3 pts), 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.
D2 · Cognitive Complexity · Vbox7IE._real_extract (cognitive 18) · ×1
  • Vbox7IE._real_extract (cognitive 18) youtube_dl/extractor/vbox7.py:111 — Vbox7IE._real_extract has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 2 (3 pts), error handling 1 (2 pts) (nesting depth added 2). 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.
D2 · Cognitive Complexity · ViewLiftEmbedIE._real_extract (cognitive 18) · ×1
  • ViewLiftEmbedIE._real_extract (cognitive 18) youtube_dl/extractor/viewlift.py:94 — ViewLiftEmbedIE._real_extract has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, loops 2, ternaries 1 (2 pts), error handling 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.
D2 · Cognitive Complexity · VRVBaseIE._call_cms (cognitive 18) · ×1
  • VRVBaseIE._call_cms (cognitive 18) youtube_dl/extractor/vrv.py:65 — VRVBaseIE._call_cms has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · WebcasterIE._real_extract (cognitive 18) · ×1
  • WebcasterIE._real_extract (cognitive 18) youtube_dl/extractor/webcaster.py:30 — WebcasterIE._real_extract has cognitive complexity 18 (threshold 15). Drivers by points: loops 3 (7 pts), if/else 2 (6 pts), ternaries 1 (5 pts) (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.
D2 · Cognitive Complexity · XAttrMetadataPP.run (cognitive 18) · ×1
  • XAttrMetadataPP.run (cognitive 18) youtube_dl/postprocessor/xattrpp.py:26 — XAttrMetadataPP.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 1 (3 pts), error handling 2, 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.
D2 · Cognitive Complexity · YoutubeDL._build_format_filter (cognitive 17) · ×1
  • YoutubeDL._build_format_filter (cognitive 17) youtube_dl/YoutubeDL.py:1225 — YoutubeDL._build_format_filter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 1 (2 pts) (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.
D2 · Cognitive Complexity · YoutubeDL.print_debug_header (cognitive 17) · ×1
  • YoutubeDL.print_debug_header (cognitive 17) youtube_dl/YoutubeDL.py:2497 — YoutubeDL.print_debug_header has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), error handling 2 (3 pts), loops 1, ternaries 1 (nesting depth added 3). 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.
D2 · Cognitive Complexity · YoutubeDL._write_thumbnails (cognitive 17) · ×1
  • YoutubeDL._write_thumbnails (cognitive 17) youtube_dl/YoutubeDL.py:2680 — YoutubeDL._write_thumbnails has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (4 pts), error handling 1 (3 pts), boolean chains 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.
D2 · Cognitive Complexity · HttpFD.real_download (cognitive 17) · ×1
  • HttpFD.real_download (cognitive 17) youtube_dl/downloader/http.py:28 — HttpFD.real_download has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), error handling 3 (6 pts), boolean chains 2, loops 1, ternaries 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.
D2 · Cognitive Complexity · AdobeTVBaseIE._parse_video_data (cognitive 17) · ×1
  • AdobeTVBaseIE._parse_video_data (cognitive 17) youtube_dl/extractor/adobetv.py:39 — AdobeTVBaseIE._parse_video_data has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · AnvatoIE._get_anvato_videos (cognitive 17) · ×1
  • AnvatoIE._get_anvato_videos (cognitive 17) REDACTED:273 — AnvatoIE._get_anvato_videos has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, if/else 3 (5 pts), ternaries 2 (4 pts), loops 2 (nesting depth added 4). 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.
D2 · Cognitive Complexity · FazIE._real_extract (cognitive 17) · ×1
  • FazIE._real_extract (cognitive 17) youtube_dl/extractor/faz.py:44 — FazIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 1, loops 1, ternaries 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.
D2 · Cognitive Complexity · IndavideoEmbedIE._real_extract (cognitive 17) · ×1
  • IndavideoEmbedIE._real_extract (cognitive 17) youtube_dl/extractor/indavideo.py:57 — IndavideoEmbedIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 2 (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.
D2 · Cognitive Complexity · IqiyiIE._real_extract (cognitive 17) · ×1
  • IqiyiIE._real_extract (cognitive 17) REDACTED:339 — IqiyiIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), 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.
D2 · Cognitive Complexity · MixcloudPlaylistBaseIE._real_extract (cognitive 17) · ×1
  • MixcloudPlaylistBaseIE._real_extract (cognitive 17) youtube_dl/extractor/mixcloud.py:234 — MixcloudPlaylistBaseIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (6 pts), if/else 3 (5 pts), boolean chains 3, loops 2 (3 pts) (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.
D2 · Cognitive Complexity · NYTimesBaseIE._extract_video_from_id (cognitive 17) · ×1
  • NYTimesBaseIE._extract_video_from_id (cognitive 17) youtube_dl/extractor/nytimes.py:23 — NYTimesBaseIE._extract_video_from_id has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 6, loops 2, ternaries 1 (nesting depth added 3). 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.
D2 · Cognitive Complexity · PlatziCourseIE._real_extract (cognitive 17) · ×1
  • PlatziCourseIE._real_extract (cognitive 17) youtube_dl/extractor/platzi.py:184 — PlatziCourseIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), 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.
D2 · Cognitive Complexity · SenateISVPIE._real_extract (cognitive 17) · ×1
  • SenateISVPIE._real_extract (cognitive 17) youtube_dl/extractor/senateisvp.py:102 — SenateISVPIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 2 (4 pts), ternaries 3 (4 pts), boolean chains 1 (nesting depth added 5). 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.
D2 · Cognitive Complexity · SinaIE._real_extract (cognitive 17) · ×1
  • SinaIE._real_extract (cognitive 17) youtube_dl/extractor/sina.py:58 — SinaIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts), boolean chains 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.
D2 · Cognitive Complexity · TagesschauIE._extract_formats (cognitive 17) · ×1
  • TagesschauIE._extract_formats (cognitive 17) youtube_dl/extractor/tagesschau.py:213 — TagesschauIE._extract_formats has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (16 pts), 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.
D2 · Cognitive Complexity · ThePlatformBaseIE._extract_theplatform_smil (cognitive 17) · ×1
  • ThePlatformBaseIE._extract_theplatform_smil (cognitive 17) youtube_dl/extractor/theplatform.py:37 — ThePlatformBaseIE._extract_theplatform_smil has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (16 pts), 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.
D2 · Cognitive Complexity · TNAFlixNetworkBaseIE._real_extract (cognitive 17) · ×1
  • TNAFlixNetworkBaseIE._real_extract (cognitive 17) youtube_dl/extractor/tnaflix.py:75 — TNAFlixNetworkBaseIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (3 pts), loops 2, boolean chains 1 (nesting depth added 5). 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.
D2 · Cognitive Complexity · TurnerBaseIE._extract_ngtv_info (cognitive 17) · ×1
  • TurnerBaseIE._extract_ngtv_info (cognitive 17) youtube_dl/extractor/turner.py:223 — TurnerBaseIE._extract_ngtv_info has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), 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.
D2 · Cognitive Complexity · TVNetIE._real_extract (cognitive 17) · ×1
  • TVNetIE._real_extract (cognitive 17) youtube_dl/extractor/tvnet.py:82 — TVNetIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 4). 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.
D2 · Cognitive Complexity · YouPornIE._real_extract (cognitive 17) · ×1
  • YouPornIE._real_extract (cognitive 17) youtube_dl/extractor/youporn.py:116 — YouPornIE._real_extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, loops 2, ternaries 1 (2 pts) (nesting depth added 4). 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.
D2 · Cognitive Complexity · InfoExtractor._extract_wowza_formats (cognitive 16) · ×1
  • InfoExtractor._extract_wowza_formats (cognitive 16) REDACTED:2967 — InfoExtractor._extract_wowza_formats has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (5 pts), boolean chains 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.
D2 · Cognitive Complexity · DiscoveryIE._real_extract (cognitive 16) · ×1
  • DiscoveryIE._real_extract (cognitive 16) youtube_dl/extractor/discovery.py:64 — DiscoveryIE._real_extract has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, error handling 1 (nesting depth added 5). 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.
D2 · Cognitive Complexity · DRTVLiveIE._real_extract (cognitive 16) · ×1
  • DRTVLiveIE._real_extract (cognitive 16) youtube_dl/extractor/drtv.py:319 — DRTVLiveIE._real_extract has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (6 pts) (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.
D2 · Cognitive Complexity · GenericIE._extract_rss (cognitive 16) · ×1
  • GenericIE._extract_rss (cognitive 16) youtube_dl/extractor/generic.py:2349 — GenericIE._extract_rss has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), boolean chains 2, ternaries 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.
D2 · Cognitive Complexity · ITVBaseIE._download_webpage_handle (cognitive 16) · ×1
  • ITVBaseIE._download_webpage_handle (cognitive 16) youtube_dl/extractor/itv.py:55 — ITVBaseIE._download_webpage_handle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4 (nesting depth added 3). 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.
D2 · Cognitive Complexity · JojIE._real_extract (cognitive 16) · ×1
  • JojIE._real_extract (cognitive 16) youtube_dl/extractor/joj.py:51 — JojIE._real_extract has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (3 pts) (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.
D2 · Cognitive Complexity · NBCNewsIE._real_extract (cognitive 16) · ×1
  • NBCNewsIE._real_extract (cognitive 16) youtube_dl/extractor/nbc.py:376 — NBCNewsIE._real_extract has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts) (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.
D2 · Cognitive Complexity · PlaytvakIE._real_extract (cognitive 16) · ×1
  • PlaytvakIE._real_extract (cognitive 16) youtube_dl/extractor/playtvak.py:102 — PlaytvakIE._real_extract has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 2, loops 2 (nesting depth added 4). 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.
D2 · Cognitive Complexity · ScreencastIE._real_extract (cognitive 16) · ×1
  • ScreencastIE._real_extract (cognitive 16) youtube_dl/extractor/screencast.py:61 — ScreencastIE._real_extract has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (16 pts) (nesting depth added 5). 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.
D2 · Cognitive Complexity · SportDeutschlandIE._real_extract (cognitive 16) · ×1
  • SportDeutschlandIE._real_extract (cognitive 16) youtube_dl/extractor/sportdeutschland.py:48 — SportDeutschlandIE._real_extract has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 4). 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.
D2 · Cognitive Complexity · SpotifyBaseIE._extract_episode (cognitive 16) · ×1
  • SpotifyBaseIE._extract_episode (cognitive 16) youtube_dl/extractor/spotify.py:43 — SpotifyBaseIE._extract_episode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, loops 2 (nesting depth added 5). 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.
D2 · Cognitive Complexity · STVPlayerIE._real_extract (cognitive 16) · ×1
  • STVPlayerIE._real_extract (cognitive 16) youtube_dl/extractor/stv.py:45 — STVPlayerIE._real_extract has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 2 (3 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ViceIE._real_extract (cognitive 16) · ×1
  • ViceIE._real_extract (cognitive 16) youtube_dl/extractor/vice.py:120 — ViceIE._real_extract has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (5 pts), error handling 1, loops 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ViqeoIE._real_extract (cognitive 16) · ×1
  • ViqeoIE._real_extract (cognitive 16) youtube_dl/extractor/viqeo.py:49 — ViqeoIE._real_extract has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (6 pts), boolean chains 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.
D2 · Cognitive Complexity · WatchBoxIE._real_extract (cognitive 16) · ×1
  • WatchBoxIE._real_extract (cognitive 16) youtube_dl/extractor/watchbox.py:65 — WatchBoxIE._real_extract has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 5. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · XimalayaIE._real_extract (cognitive 16) · ×1
  • XimalayaIE._real_extract (cognitive 16) youtube_dl/extractor/ximalaya.py:108 — XimalayaIE._real_extract has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 3 (4 pts), loops 2 (nesting depth added 5). 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.
D2 · Cognitive Complexity · JS_RegExp.__getattr__ (cognitive 16) · ×1
  • JS_RegExp.__getattr__ (cognitive 16) youtube_dl/jsinterp.py:484 — JS_RegExp.__getattr__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (6 pts), loops 1 (2 pts) (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.
D2 · Cognitive Complexity · utils.parse_duration (cognitive 16) · ×1
  • utils.parse_duration (cognitive 16) REDACTED:3929 — utils.parse_duration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 5 (nesting depth added 3). 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D32 · Data Compliance (PII/GDPR) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) youtube_dl/extractor/dplay.py:188 — youtube_dl/extractor/dplay.py:188-287 | youtube_dl/extractor/generic.py:2530-3781 | youtube_dl/extractor/npo.py:187-297 | REDACTED:64-148 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) youtube_dl/extractor/go.py:290 — youtube_dl/extractor/go.py:290-315 | youtube_dl/extractor/vrv.py:217-246 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/go.py:290` 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. 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.
D4 · Code Duplication · Duplicated block (23–24 lines × 2) · ×1
  • Duplicated block (23–24 lines × 2) youtube_dl/extractor/frontendmasters.py:36 — youtube_dl/extractor/frontendmasters.py:36-58 | youtube_dl/extractor/pluralsight.py:169-192 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/frontendmasters.py:36` 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.
D4 · Code Duplication · Duplicated block (12–22 lines × 2) · ×1
  • Duplicated block (12–22 lines × 2) youtube_dl/extractor/generic.py:2968 — youtube_dl/extractor/generic.py:2968-2979 | youtube_dl/extractor/generic.py:3113-3134 — 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 `youtube_dl/extractor/generic.py:2968` 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.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) youtube_dl/extractor/hornbunny.py:32 — youtube_dl/extractor/hornbunny.py:32-49 | REDACTED:47-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×1
  • Duplicated block (16 lines × 2) youtube_dl/update.py:106 — youtube_dl/update.py:106-121 | youtube_dl/update.py:152-167 — 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.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) youtube_dl/options.py:607 — youtube_dl/options.py:607-621 | youtube_dl/options.py:639-653 | youtube_dl/options.py:664-678 — 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 `youtube_dl/options.py:607` 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.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) youtube_dl/extractor/scte.py:21 — youtube_dl/extractor/scte.py:21-34 | youtube_dl/extractor/udemy.py:175-189 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/scte.py:21` 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.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) youtube_dl/downloader/external.py:452 — youtube_dl/downloader/external.py:452-465 | youtube_dl/downloader/rtmp.py:128-140 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/downloader/rtmp.py:128` 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.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×1
  • Duplicated block (13 lines × 2) youtube_dl/extractor/livestream.py:162 — youtube_dl/extractor/livestream.py:162-174 | youtube_dl/extractor/livestream.py:290-303 — 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.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) youtube_dl/extractor/morningstar.py:31 — youtube_dl/extractor/morningstar.py:31-42 | youtube_dl/extractor/ruhd.py:23-35 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/morningstar.py:31` 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.
D4 · Code Duplication · Duplicated block (11–12 lines × 6) · ×1
  • Duplicated block (11–12 lines × 6) youtube_dl/options.py:150 — youtube_dl/options.py:150-160 | youtube_dl/options.py:620-630 | youtube_dl/options.py:656-667 | youtube_dl/options.py:763-773 | youtube_dl/options.py:795-805 | youtube_dl/options.py:832-842 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/options.py:150` 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.
D4 · Code Duplication · Duplicated block (10–12 lines × 4) · ×1
  • Duplicated block (10–12 lines × 4) youtube_dl/options.py:187 — youtube_dl/options.py:187-198 | youtube_dl/options.py:606-615 | youtube_dl/options.py:637-647 | youtube_dl/options.py:662-672 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/options.py:187` 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.
D4 · Code Duplication · Duplicated block (11–12 lines × 4) · ×1
  • Duplicated block (11–12 lines × 4) youtube_dl/options.py:185 — youtube_dl/options.py:185-196 | youtube_dl/options.py:546-557 | youtube_dl/options.py:635-645 | youtube_dl/options.py:660-670 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/options.py:185` 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.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×1
  • Duplicated block (12 lines × 4) youtube_dl/options.py:442 — youtube_dl/options.py:442-453 | youtube_dl/options.py:615-626 | youtube_dl/options.py:672-683 | youtube_dl/options.py:827-838 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/options.py:442` 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.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) youtube_dl/extractor/byutv.py:92 — youtube_dl/extractor/byutv.py:92-103 | youtube_dl/extractor/egghead.py:114-124 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (10–11 lines × 7) · ×1
  • Duplicated block (10–11 lines × 7) youtube_dl/options.py:153 — youtube_dl/options.py:153-163 | youtube_dl/options.py:184-194 | youtube_dl/options.py:446-456 | youtube_dl/options.py:619-629 | youtube_dl/options.py:660-669 | youtube_dl/options.py:766-775 | youtube_dl/options.py:831-841 — 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 `youtube_dl/options.py:153` 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.
D4 · Code Duplication · Duplicated block (10–11 lines × 4) · ×1
  • Duplicated block (10–11 lines × 4) youtube_dl/options.py:442 — youtube_dl/options.py:442-452 | youtube_dl/options.py:603-612 | youtube_dl/options.py:615-625 | youtube_dl/options.py:672-682 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/options.py:442` 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.
D4 · Code Duplication · Duplicated block (10 lines × 7) · ×1
  • Duplicated block (10 lines × 7) youtube_dl/options.py:152 — youtube_dl/options.py:152-161 | youtube_dl/options.py:445-454 | youtube_dl/options.py:618-627 | youtube_dl/options.py:659-668 | youtube_dl/options.py:765-774 | youtube_dl/options.py:797-806 | youtube_dl/options.py:830-839 — 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 `youtube_dl/options.py:152` 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.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) youtube_dl/extractor/byutv.py:89 — youtube_dl/extractor/byutv.py:89-98 | youtube_dl/extractor/crackle.py:109-118 | youtube_dl/extractor/egghead.py:111-120 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. 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.
D4 · Code Duplication · Duplicated block (9 lines × 8) · ×1
  • Duplicated block (9 lines × 8) youtube_dl/options.py:151 — youtube_dl/options.py:151-160 | youtube_dl/options.py:445-453 | youtube_dl/options.py:618-626 | youtube_dl/options.py:658-667 | youtube_dl/options.py:675-683 | youtube_dl/options.py:764-773 | youtube_dl/options.py:796-805 | youtube_dl/options.py:830-838 — 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 `youtube_dl/options.py:151` 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.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) youtube_dl/extractor/arkena.py:66 — youtube_dl/extractor/arkena.py:66-74 | youtube_dl/extractor/francetv.py:223-230 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (8 lines × 5) · ×1
  • Duplicated block (8 lines × 5) youtube_dl/extractor/generic.py:2937 — youtube_dl/extractor/generic.py:2937-2944 | youtube_dl/extractor/generic.py:2967-2975 | youtube_dl/extractor/generic.py:3063-3072 | youtube_dl/extractor/generic.py:3112-3128 | youtube_dl/extractor/generic.py:3153-3163 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/generic.py:2937` 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. 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.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×1
  • Duplicated block (7–8 lines × 3) youtube_dl/extractor/dplay.py:231 — youtube_dl/extractor/dplay.py:231-238 | youtube_dl/extractor/generic.py:3572-3578 | REDACTED:96-102 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, 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.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) youtube_dl/extractor/nbc.py:377 — youtube_dl/extractor/nbc.py:377-383 | youtube_dl/extractor/tiktok.py:108-113 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `youtube_dl/extractor/tiktok.py:108` 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.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×1
  • Duplicated block (6 lines × 2) youtube_dl/extractor/pbs.py:635 — youtube_dl/extractor/pbs.py:635-640 | youtube_dl/extractor/ted.py:261-266 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, 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.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) REDACTED:98 — REDACTED:98-103 | youtube_dl/extractor/xfileshare.py:189-194 | youtube_dl/extractor/youporn.py:109-114 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
P2 · Observability · No structured logging · ×1
  • No structured logging — No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.
Minor — 647 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×568
  • Orphaned file youtube_dl/extractor/adobepass.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file youtube_dl/extractor/pbs.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file youtube_dl/extractor/nrk.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file youtube_dl/swfinterp.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file youtube_dl/extractor/brightcove.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file youtube_dl/extractor/facebook.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file youtube_dl/extractor/soundcloud.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file youtube_dl/extractor/peertube.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file youtube_dl/extractor/npo.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file youtube_dl/extractor/twitter.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file youtube_dl/extractor/vk.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file youtube_dl/postprocessor/ffmpeg.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file youtube_dl/extractor/rai.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file youtube_dl/downloader/external.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file youtube_dl/__init__.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file youtube_dl/extractor/francetv.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file youtube_dl/extractor/nbc.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 543 more in this group — see findings.md.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×40
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/academicearth.py:31 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/airmozilla.py:63 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/brightcove.py:269 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/buzzfeed.py:76 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex REDACTED:1284 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/condenast.py:116 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex REDACTED:673 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/drtuber.py:98 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/eagleplatform.py:85 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/esri.py:38 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/esri.py:40 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/facebook.py:345 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/facebook.py:519 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/fourtube.py:70 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/generic.py:2879 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/generic.py:3120 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/googlesearch.py:46 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/imgur.py:162 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/ivi.py:260 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/lifenews.py:222 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/livestream.py:309 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/massengeschmacktv.py:56 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/metacafe.py:183 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/metacafe.py:196 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex youtube_dl/extractor/metacafe.py:265 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Python code already uses a real parser in the same package; use it here too.
  • + 15 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×21
  • Duplicated predicate youtube_dl/extractor/pbs.py:636 — `f.get('protocol') == 'm3u8' and f.get('vcodec') != 'none'` appears character-identically in 2 files — youtube_dl/extractor/pbs.py, youtube_dl/extractor/ted.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate youtube_dl/extractor/plays.py:49 — `info.get('thumbnail') or self._og_search_thumbnail(webpage)` appears character-identically in 2 files — youtube_dl/extractor/plays.py, youtube_dl/extractor/vbox7.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:72 — `isinstance(e.cause, compat_HTTPError) and e.cause.code == 400` appears character-identically in 6 files — REDACTED, youtube_dl/extractor/dplay.py, youtube_dl/extractor/packtpub.py, youtube_dl/extractor/vidme.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate youtube_dl/extractor/adn.py:158 — `isinstance(e.cause, compat_HTTPError) and e.cause.code == 401` appears character-identically in 16 files — youtube_dl/extractor/adn.py, youtube_dl/extractor/canvas.py, REDACTED, youtube_dl/extractor/crackle.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate youtube_dl/extractor/dplay.py:220 — `isinstance(e.cause, compat_HTTPError) and e.cause.code == 403` appears character-identically in 18 files — youtube_dl/extractor/dplay.py, REDACTED, youtube_dl/extractor/funimation.py, youtube_dl/extractor/hotstar.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate youtube_dl/extractor/ign.py:39 — `isinstance(e.cause, compat_HTTPError) and e.cause.code == 404` appears character-identically in 3 files — youtube_dl/extractor/ign.py, REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate youtube_dl/extractor/brightcove.py:647 — `isinstance(e.cause, compat_HTTPError) and e.cause.code in (401, 403)` appears character-identically in 2 files — youtube_dl/extractor/brightcove.py, youtube_dl/extractor/discovery.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate youtube_dl/extractor/bbc.py:479 — `isinstance(ee.cause, compat_HTTPError) and ee.cause.code == 404` appears character-identically in 3 files — youtube_dl/extractor/bbc.py, youtube_dl/extractor/npo.py, youtube_dl/extractor/rte.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:1939 — `line.startswith('#') or not line.strip()` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate youtube_dl/extractor/howstuffworks.py:43 — `m3u8_url and determine_ext(m3u8_url) == 'm3u8'` appears character-identically in 2 files — youtube_dl/extractor/howstuffworks.py, youtube_dl/extractor/konserthusetplay.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate youtube_dl/extractor/metacafe.py:239 — `mimetype2ext(source.get('type')) or determine_ext(source_url)` appears character-identically in 2 files — youtube_dl/extractor/metacafe.py, youtube_dl/extractor/tweakers.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:394 — `not cursor or not isinstance(cursor, compat_str)` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate youtube_dl/extractor/philharmoniedeparis.py:75 — `not format_url or format_url in format_urls` appears character-identically in 2 files — youtube_dl/extractor/philharmoniedeparis.py, youtube_dl/extractor/xhamster.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:131 — `not items or not isinstance(items, list)` appears character-identically in 2 files — REDACTED, youtube_dl/extractor/younow.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate youtube_dl/extractor/rutube.py:206 — `not results or not isinstance(results, list)` appears character-identically in 2 files — youtube_dl/extractor/rutube.py, youtube_dl/extractor/spreaker.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate youtube_dl/extractor/stv.py:48 — `self._download_webpage(url, video_id, fatal=False) or ''` appears character-identically in 2 files — youtube_dl/extractor/stv.py, youtube_dl/extractor/vbox7.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate youtube_dl/extractor/pbs.py:448 — `self._og_search_description( webpage, default=None) or self._html_search_meta( 'description', webpage, default=None)` appears character-identically in 2 files — youtube_dl/extractor/pbs.py, youtube_dl/extractor/tvp.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate youtube_dl/extractor/ivi.py:199 — `self._og_search_description(webpage, default=None) or self._html_search_meta( 'description', webpage, 'description', default=None)` appears character-identically in 2 files — youtube_dl/extractor/ivi.py, youtube_dl/extractor/playtvak.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate youtube_dl/extractor/generic.py:3572 — `src_type == 'application/dash+xml' or ext == 'mpd'` appears character-identically in 2 files — youtube_dl/extractor/generic.py, youtube_dl/extractor/tv2dk.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate youtube_dl/extractor/generic.py:3575 — `src_type == 'application/x-mpegurl' or ext == 'm3u8'` appears character-identically in 2 files — youtube_dl/extractor/generic.py, youtube_dl/extractor/tv2dk.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate youtube_dl/YoutubeDL.py:786 — `sys.version_info < (3, 0) and sys.platform == 'win32'` appears character-identically in 2 files — youtube_dl/YoutubeDL.py, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
D34 · Knowledge Freshness · Most significant orphaned file · ×3
  • Most significant orphaned file youtube_dl/extractor/generic.py:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file youtube_dl/extractor/bbc.py:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file youtube_dl/extractor/vimeo.py:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
D13 · REDACTED Scanning · Algolia API key used for search · ×1
  • REDACTED
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 7 significant file(s) lose their only recent owner: REDACTED, REDACTED, youtube_dl/YoutubeDL.py, REDACTED, youtube_dl/jsinterp.py, youtube_dl/options.py, youtube_dl/cache.py. Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (8 single-owned of 274 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 274 of the 864 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: youtube_dl/downloader/fragment.py.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D28 · Secrets (history) · Algolia API key used for search · ×1
  • REDACTED
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Concentrated knowledge decay · ×1
  • Concentrated knowledge decay — 571 of 611 significant files have no living knowledge, while the repository is still being changed at a low rate (6 commit(s) in the last 90 days) — so this is one repo-wide knowledge-decay state, not 571 separate risks. Counted over 611 of the 864 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. The code moved on without the people who understood these files: document them or schedule a read-through before the next change lands in them.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, 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.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:23 — No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×1
  • Silent fallback default on parse failure REDACTED:4657 — `q` (in `qualities`) returns `-1` when `ValueError` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.

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.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-930561b358b840b0a3ab9268e6c6f288/history.json --exit-code 0 --source .81artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-930561b358b840b0a3ab9268e6c6f288/tree.json --exit-code 0 --source .39artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude test/testdata/cookies .53artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesnone (no readable dependency manifest)—none (no readable dependency manifest): not applicable — 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), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).0—
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep --config /opt/semgrep-rules/gdpr.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude test/testdata/cookies .1artifacts/raw/semgrep-gdpr.json
D37 · Vulnerability-disclosure Policydisclosure—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.0—
D40 · Network Egress Confinementruntime-hardening—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.0—
D41 · Kernel & Syscall Confinementruntime-hardening—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.0—
D42 · Runtime Threat Enforcementruntime-hardening—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—
D43 · Malicious Dependenciesnone (no readable dependency manifest)—none (no readable dependency manifest): not applicable — 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), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).0—

Run 01a1c894-fd73-794c-b074-0a62ead52b4e · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

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.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md