Skip to content

Conversation

@cdce8p
Copy link
Member

@cdce8p cdce8p commented Oct 10, 2025

Description

Similar to AssignName nodes, Import and ImportFrom nodes should add the name to the module locals if used with global.

This does resolve the no-name-in-module error seen for concurrent.futures.ProcessPoolExecutor in Python 3.14.
pylint-dev/pylint#10632.

@cdce8p cdce8p added this to the 4.0.1 milestone Oct 10, 2025
@codecov
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.34%. Comparing base (8c4da6a) to head (0abe4e6).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2856   +/-   ##
=======================================
  Coverage   93.33%   93.34%           
=======================================
  Files          92       92           
  Lines       11170    11176    +6     
=======================================
+ Hits        10426    10432    +6     
  Misses        744      744           
Flag Coverage Δ
linux 93.20% <100.00%> (+<0.01%) ⬆️
pypy 93.34% <100.00%> (+<0.01%) ⬆️
windows 93.32% <100.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
astroid/builder.py 95.25% <100.00%> (+0.08%) ⬆️
astroid/rebuilder.py 98.22% <100.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cdce8p cdce8p force-pushed the import-with-globals branch from b6f27d1 to 0abe4e6 Compare October 10, 2025 23:03
@cdce8p cdce8p closed this Oct 10, 2025
@cdce8p cdce8p deleted the import-with-globals branch October 10, 2025 23:03
@cdce8p cdce8p restored the import-with-globals branch October 10, 2025 23:04
@cdce8p cdce8p reopened this Oct 10, 2025
@cdce8p
Copy link
Member Author

cdce8p commented Oct 10, 2025

Opened pylint-dev/pylint#10633 with the changes required for pylint after this PR is merged.

@Pierre-Sassoulas Pierre-Sassoulas merged commit 1afbca6 into pylint-dev:main Oct 11, 2025
25 of 30 checks passed
@cdce8p cdce8p deleted the import-with-globals branch October 11, 2025 13:04
pylint-backport bot pushed a commit that referenced this pull request Oct 11, 2025
cdce8p added a commit that referenced this pull request Oct 11, 2025
…used with global (#2857)

Assign import nodes to module locals if used with global (#2856)

(cherry picked from commit 1afbca6)

Co-authored-by: Marc Mueller <[email protected]>
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.

3 participants