Open KristianTashkov opened 12 months ago
I have asked the question on stackoverflow and a user speculates that a particular line in dicover files is causing the issue https://stackoverflow.com/q/77357606/812912
I did a local test with fixing the order of files returned by os.walk (sorted(..., reverse=True)) this guarantees that if we have two directories, one a prefix of the other (e.g. dataset and dataset_utils), then the latter will come first (i.e. dataset_utils comes before dataset). Doing that it seems pylint now behaves as expected. I am not suggesting this should be the actual fix, just providing it as information for easier diagnosis
If it sounds like the actual fix, swim like the actual fix and quack like the actual fix (and modify a single line of code), it's probably the actual fix 😄 Do you want to open a PR to be credited for it @istrandjev ?
I agree! Unfortunately it looks like a workaround, quacks like an ugly hack and it is extremely obscure why this order matters and how it fixes problems. For sure there is a "right" way to do this but it will require a bit more investigation. I would try to do but not sure about timeline at this point
Bug description
You get different results from pylint when the folders are called
dataset
vstrain
.On a clean environment, if you run:
Configuration
No response
Command used
Pylint output
First execution has empty output.
Second execution has the expected:
Expected behavior
Regardless of the folder name, expect both versions to return the same output.
Pylint version
OS / Environment
Apple Mac M1
Additional dependencies
No response