Repository navigation
Conversation
This was referenced Nov 23, 2026
Remove three branches of statespace/news.py that no input reaches: - The except AttributeError around Series.map in the univariate block of summary_impacts: Series.map exists in every pandas version (it fell back to Series.applymap, which never existed). The pandas < 2.1 fallbacks around DataFrame.map are kept; the minimum-versions job runs them. - if self.revisions_details_start > 0 in _revision_grouped_impacts: it is only called when some revisions are grouped, and revisions are grouped only if they are before revisions_details_start > 0 (SmootherResults.news), which only increases afterwards. - if key in details for the data columns in summary_details: the observed (revised), previous, news (revision), weight and impact columns are always in the table; only the date and variable keys can be moved to the title. Not changed - Any result: the remaining code is what ran before. Tests - test_news.py passes unchanged on pandas 3.0.5 and 2.3.3 with -W error.
bashtage
force-pushed
the
wip-news-unreachable
branch
from
November 28, 2026 22:06
1f397ad to
450b84c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#11080 and #11078, which this PR was stacked on, are merged. No conflict with #11054, #11057, #11058 or #11029. With the get_impacts PR, only the blocks that it and #11080 append to
test_news.pyconflict: keep both.REF: Remove unreachable code in NewsResults
Remove three branches of statespace/news.py that no input reaches:
summary_impacts: Series.map exists in every pandas version (it fell back
to Series.applymap, which never existed). The pandas < 2.1 fallbacks
around DataFrame.map are kept; the minimum-versions job runs them.
only called when some revisions are grouped, and revisions are grouped
only if they are before revisions_details_start > 0
(SmootherResults.news), which only increases afterwards.
observed (revised), previous, news (revision), weight and impact
columns are always in the table; only the date and variable keys can be
moved to the title.
Not changed
Tests
test_news.py passes unchanged on pandas 3.0.5 and 2.3.3 with -W error.
tests added / passed.
code/documentation is well formatted.
properly formatted commit message. See
NumPy's guide.
AI Disclosure
Contributions must comply with the statsmodels AI Policy.
Tick exactly one of the following. If AI tools were used, replace the
<...>placeholders in the second option with the tool name(s) and how the tool's output was
used.
Tool(s): Claude Code (Claude Opus 5.5).
Used for: finding the unreachable code in a coverage audit, removing it, and checking that the results do not change.
I have personally read, understood, and can explain every line of this diff, and
have verified the statistical/numerical correctness of the change.
🤖 Generated with Claude Code