Skip to content

[fix] Fix a crash when the root of a node is not a module but is unknown#2739

Merged
Pierre-Sassoulas merged 2 commits intomainfrom
2672-assertionerror-when-root-is-not-a-module
May 13, 2025
Merged

[fix] Fix a crash when the root of a node is not a module but is unknown#2739
Pierre-Sassoulas merged 2 commits intomainfrom
2672-assertionerror-when-root-is-not-a-module

Conversation

@Pierre-Sassoulas
Copy link
Copy Markdown
Member

Type of Changes

Type
🐛 Bug fix

Description

Closes #2672

@codecov
Copy link
Copy Markdown

codecov bot commented May 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.25%. Comparing base (59f36e7) to head (881402f).
⚠️ Report is 57 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2739      +/-   ##
==========================================
+ Coverage   93.21%   93.25%   +0.03%     
==========================================
  Files          93       93              
  Lines       11072    11072              
==========================================
+ Hits        10321    10325       +4     
+ Misses        751      747       -4     
Flag Coverage Δ
linux 93.11% <100.00%> (+0.03%) ⬆️
pypy 93.25% <100.00%> (+0.03%) ⬆️
windows 93.23% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
astroid/nodes/node_ng.py 92.63% <100.00%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Pierre-Sassoulas Pierre-Sassoulas merged commit 97aac52 into main May 13, 2025
20 checks passed
@Pierre-Sassoulas Pierre-Sassoulas deleted the 2672-assertionerror-when-root-is-not-a-module branch May 13, 2025 11:51
@github-actions
Copy link
Copy Markdown
Contributor

The backport to maintenance/3.3.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-maintenance/3.3.x maintenance/3.3.x
# Navigate to the new working tree
cd .worktrees/backport-maintenance/3.3.x
# Create a new branch
git switch --create backport-2739-to-maintenance/3.3.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 97aac5237d4dac1a6ebef606df75f92c630a3d33
# Push it to GitHub
git push --set-upstream origin backport-2739-to-maintenance/3.3.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-maintenance/3.3.x

Then, create a pull request where the base branch is maintenance/3.3.x and the compare/head branch is backport-2739-to-maintenance/3.3.x.

@Pierre-Sassoulas
Copy link
Copy Markdown
Member Author

Backporting this create a new crash, beside the maintenance branch does not need this fix because it was introduced in the main branch only in #2536. Reopened #120 because it wasn't fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AssertionError when root is not a module

2 participants