Skip to content

fix(schedule13): get_summary() warns at the caller's line; empty rows display as not reported - #1384

Merged
dgunning merged 1 commit into
mainfrom
fix/schedule13-summary-warning
Sep 30, 2026
Merged

dgunning merged 1 commit into
mainfrom
fix/schedule13-summary-warning

Conversation

@dgunning

Copy link
Copy Markdown
Owner

Follow-up to #1379. It fixes two of the review nits on our side.

1. get_summary() warnings pointed into the library. get_summary() read self.shares_change and self.percent_change. That emitted two FutureWarnings, and with stacklevel=3 they were attributed to amendments.py. Python's default filter keys on that location, so the warning showed once per process and never named the user's call site. get_summary() now computes the 5.x values directly and emits one warning of its own at the caller's line. The returned values are unchanged.

2. An empty <reportingPersons> displayed as 0. _reported_total() returned max([], default=0), so to_context() and the Rich tables showed 0 shares while OwnershipComparison treated the same filing as unknown. It now returns None, so the display says "not reported".

Tests: two regressions added to tests/issues/regression/test_issue_1379_schedule13_unreported_figures.py. Both fail without the source change (assert 2 == 1 warnings; 0 shares in the context). The Schedule 13 suite passes offline: 59 passed, 1 network test deselected.

Not in this PR: OwnershipComparison sums the reporting persons, while total_shares takes max() because persons in one filing overlap. Fixing that changes the returned numbers, so it's tracked separately in bead edgartools-qsk4.

🤖 Generated with Claude Code

… display as not reported

Follow-up to #1379.

get_summary() read self.shares_change and self.percent_change, so it emitted
two FutureWarnings whose stacklevel landed inside amendments.py. Python's
default filter keys on that location, so the warning showed once per process
and never named the user's call site. get_summary() now computes the 5.x
values directly and emits one warning of its own at the caller's line.

_reported_total() returned max([], default=0) for a filing with no
reporting-person rows, so to_context() and the Rich tables showed 0 shares
while OwnershipComparison treated the same filing as unknown. It now returns
None, and the display says "not reported".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dgunning
dgunning enabled auto-merge (squash) September 30, 2026 14:52
@dgunning
dgunning merged commit 5b5e57f into main Sep 30, 2026
10 checks passed
@dgunning
dgunning deleted the fix/schedule13-summary-warning branch September 30, 2026 15:06
dgunning added a commit that referenced this pull request Sep 30, 2026
…uide (07lk.14) (#1388)

#1200/#1201 shipped the edgar.files deprecations in 5.55.0 with no
docs/upgrade/6.0.md entry, and nothing mechanical noticed. A CHANGELOG entry
gets written by habit; an upgrade-guide entry does not.

scripts/check_upgrade_guide.py reads the PR's added lines in edgar/ (from the
pull-request files API, since the checkout is shallow) and fails when they
stage a 6.0 change -- warn_will_raise(), a *deprecat*( helper,
warn_legacy_html_usage(), DeprecationWarning/FutureWarning, "removed/deprecated
in [edgartools] [v]6.0", or a new deprecated/removed changelog fragment --
without the PR also touching docs/upgrade/6.0.md. Comments and defs are
ignored, and staging markers are netted across the PR, so moving or
restructuring an existing warning, or deleting one in the 6.0 window, passes.
The `no-upgrade-guide` label skips it visibly.

Replayed over the 265 commits merged since the guide was created: 10 staged
and updated the guide (pass); 5 fail. Four are real misses -- #1034, #1201,
2464a53 (effect/form144 moves), 4e31aed (FilingHomepage soup deprecation,
still absent from the guide). The fifth, #1384, added a warning site for a
change #1379 had just documented, the label's case. Netting is what cleared
#1037. The first two trigger rules (generic helper name, "v6.0" spelling) were
widened after the replay showed #1201 and 4e31aed slipping through.

Runs as a step in test-fast, the required context, like the other source
gates. Adds .github/pull_request_template.md: the Definition of Done
checklist, the 6.0 guide item, and an optional working-context section.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@dgunning dgunning mentioned this pull request Oct 2, 2026
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