Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to order of module discovery #2531

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Conversation

akamat10
Copy link
Contributor

@akamat10 akamat10 commented Aug 28, 2024

Type of Changes

Type
🐛 Bug fix

Description

@akamat10
Copy link
Contributor Author

One thing this fix needs to consider is how the order of module discovery changes based on whether a user calls:

python3.12 pkg/script.py

vs

python3.12 -m pkg.script

The difference in behavior is described here in a stackoverflow post.

The test fixes to test_nonregr_absolute_import case will now match the former case but perhaps some thought needs to be given to the latter case and have some test cases around it.

Copy link

codecov bot commented Aug 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.02%. Comparing base (a389ef7) to head (04fbce5).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2531      +/-   ##
==========================================
+ Coverage   92.98%   93.02%   +0.03%     
==========================================
  Files          93       93              
  Lines       11049    11052       +3     
==========================================
+ Hits        10274    10281       +7     
+ Misses        775      771       -4     
Flag Coverage Δ
linux 92.89% <100.00%> (+0.03%) ⬆️
pypy 93.02% <100.00%> (+0.03%) ⬆️
windows 93.00% <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/_base_nodes.py 94.31% <100.00%> (+0.06%) ⬆️
astroid/nodes/scoped_nodes/scoped_nodes.py 92.79% <100.00%> (ø)

... and 2 files with indirect coverage changes

@jacobtylerwalls jacobtylerwalls modified the milestones: 3.3.3, 3.4.0, 3.3.4 Sep 20, 2024
@Pierre-Sassoulas Pierre-Sassoulas modified the milestones: 3.3.4, 3.3.5 Sep 23, 2024
@jacobtylerwalls jacobtylerwalls modified the milestones: 3.3.5, 3.3.6 Oct 4, 2024
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