Regression failure when testing with latest version of astroid #10018
Labels
Maintenance
Discussion or action around maintaining pylint or the dev workflow
Needs PR
This issue is accepted, sufficiently specified and now needs an implementation
Milestone
Bug description
When testing
pylint
against latest astroid in repo, there are regression failures. This is tied to an attempt to fix import paths in pylint-dev/astroid#2589 that is needed to support source-roots fallback #9967 and also clean up the logic.The following is the output against the latest astroid repo:
One of the failures is in
TestExpandModules.test_expand_modules
:The root cause is this line here. This code is making an incorrect assumption that "." is supposed to be current directory and is understood by modutils.modpath_from_file when in fact this api doesn't have any notion of "." being current directory. I tried changing "." to
os.getcwd()
and this case gets fixed BUT then other tests start breaking. At least a couple of them appear to be false assumptions around what the qualified module names need to be. I will need time to fully understand it.In the meantime, can I change
modutils.modpath_from_file
to have a flag (called sayprepend_additional_paths
) that allows me to introduce this new (what I think is correct behavior) and use this for #9967 while keeping old behavior ifprepend_additional_paths
is false? We can slowly analyze the failures, fix the tests and decide if we want to break the backwards compatibility in the future.Configuration
None
Command used
None
Pylint output
None
Expected behavior
Explained above
Pylint version
astroid 4.0.0.dev0
pylint 4.0.0.dev0
OS / Environment
No response
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: