Skip to content

feat(schedule13)!: figures a filing does not report are None, not 0 (edgartools-u6tkw) - #1621

Merged
dgunning merged 5 commits into
mainfrom
feat/u6tkw-schedule13-unreported-is-none
Oct 20, 2026
Merged

dgunning merged 5 commits into
mainfrom
feat/u6tkw-schedule13-unreported-is-none

Conversation

@dgunning

Copy link
Copy Markdown
Owner

What

This is the last staged 6.0 flip. The migration guide promised it under "Still to come", and it warned in 5.x through a FutureWarning on shares_change, percent_change and get_summary(). Schedule 13D/G ownership figures a filing does not report are now None instead of 0. A reported 0 stays 0.

Values 6.0
ReportingPerson's six ownership figures None when unreported. The fields are Optional, and a new __post_init__ keeps them and unreported_fields in step, so the 5.x construction style of a placeholder 0 plus unreported_fields still works
total_voting_power, total_dispositive_power None when either half is unreported
Schedule13D/13G total_shares, total_percent One shared _reported_total rule, where there used to be four copies. None when a counted person leaves the figure out or there are no reporting-person rows. Still 0 when every person is is_aggregate_exclude_shares
OwnershipComparison.shares_change, percent_change, get_summary() Return the None-safe values. The FutureWarning helpers and _placeholder_total are removed

The 5.x None-returning names stay as non-warning aliases: reported(), unreported_fields, reported_shares_change and reported_percent_change.

Consumers checked. rendering.py, to_context, the direction flags and the MCP reader (edgar/ai/mcp/tools/reader.py:497) already handled None. The only other edgar/ hits are differently named fields on proxy and Form 4 objects.

Docs. There is a new docs/upgrade/6.0.md section, and "Still to come" (now empty) becomes "Not in 6.0", which holds the module-moves note. docs/guides/schedule13dg-data-object-guide.md is updated, including a stale paragraph that said the comparison "adds up the rows", which has been wrong since #1400.

This branch includes #1620 (the guide review) merged in, because both edit the same table. Review or merge #1620 first.

Verification

  • Ground truth: BML Investment Partners' SCHEDULE 13D on Aadi Bioscience, 0001373604-24-000118 (filed 2024-12-31). It was re-fetched from SEC and matches the tracked fixture apart from whitespace and the masked CCC.
    • BML reports sole voting 0 (a reported 0 that stays 0), and shared voting and aggregate 2,100,000 at 8.5%.
    • Leonard Braden Michael reports aggregate 2,435,000 at 9.9%, with voting power 2,435,000.
    • total_shares is 2,435,000 and total_percent is 9.9.
    • On an amendment derived from it that drops BML's shares: total_shares, aggregate_amount, total_voting_power and shares_change are None, total_percent stays 9.9, and percent_change is 0.0. 5.x reported that amendment as a 2,435,000-share decrease.
  • New tests: tests/issues/regression/test_u6tkw_schedule13_unreported_is_none.py, 5 tests, all run with FutureWarning promoted to an error.
  • Updated tests: 7 tests in test_issue_1379_schedule13_unreported_figures.py asserted the 5.x placeholder 0s, the old change values and the FutureWarning. That is the behaviour this PR reverses, so they now assert None and no warning. The controls for reported zeros and real changes are unchanged.
  • Suite: hatch run test-fast: 42,657 passed, 0 failed. After the guide merge, the 13D/G tests plus both docs gates pass (55 tests).

Implemented by a Claude Code subagent (Claude Opus 5.5) and reviewed in the main session.

🤖 Generated with Claude Code

dgunning and others added 4 commits October 18, 2026 16:56
Every breaking PR since v5.62.0 (17) and every pending removed/changed
fragment (19) has a section; nothing was missing. Fixes from reading the
whole guide and running all 43 python blocks against main:

- The intro said 6.0 is still in development; it now says the page covers
  every change merged for 6.0.
- "Each of these warns in 5.x" was false for two removals that never
  warned (edgar.core.Result, the names outside edgar.__all__); the note now
  lists what warned and names the two that did not.
- "Still to come": public API enforcement shipped (#1611) and the source
  tree reorg was deferred to 6.x; both rows are gone. The Schedule 13D/G row
  stays until edgartools-u6tkw lands.
- The five `sed -i ''` rewrites were macOS-only; they are perl -pi -e now,
  tested on a sample file.
- The get_concept() lease example returned None for every company:
  get_concept takes synonym-group names, not raw tags. It uses get_fact()
  with a same-period check (Snowflake: 59.8M + 420.0M = 479.8M).
- Smaller accuracy fixes: the access modes did not move to edgar.settings,
  __all__ shipped in 5.47.0, the Apple blank-cell row is fiscal 2023, the
  Citigroup Item 1 count names its filing, the mda example's comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…edgartools-u6tkw)

6.0 flip staged in 5.x by #1379/#1384/#1400. ReportingPerson's six
ownership figures hold None for an unreported figure (__post_init__ keeps
the fields and unreported_fields in step, so 5.x-style construction with a
placeholder 0 still works); total_voting_power/total_dispositive_power are
None when either half is; Schedule13D/G total_shares/total_percent use the
shared _reported_total rule (None for a counted person leaving the figure
out or no reporting-person rows; 0 when every person is excluded).
OwnershipComparison.shares_change/percent_change and get_summary() values
are None for unreported figures and no longer emit a FutureWarning;
reported_shares_change/reported_percent_change and ReportingPerson.reported()
stay as non-warning aliases.

Tests in test_issue_1379 that asserted the 5.x placeholder 0s and the
FutureWarning now assert None and no warning. New regression test pins
values from BML Investment Partners' 13D on Aadi Bioscience,
0001373604-24-000118.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…me becomes Not in 6.0 (edgartools-u6tkw)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dgunning
dgunning enabled auto-merge (squash) October 18, 2026 21:17
Resolve docs/upgrade/6.0.md: keep this branch's Schedule 13D/G section and
'Not in 6.0'; main's 'Still to come' table (from #1620) described this
change as pending.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dgunning
dgunning merged commit c2987cc into main Oct 20, 2026
9 checks passed
@dgunning
dgunning deleted the feat/u6tkw-schedule13-unreported-is-none branch October 20, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant