Skip to content

Commit

Permalink
Fix to maintain order of package paths (#9887)
Browse files Browse the repository at this point in the history
(cherry picked from commit 8314743)
  • Loading branch information
akamat10 authored and github-actions[bot] committed Aug 27, 2024
1 parent b4c2951 commit f2961dc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions doc/whatsnew/fragments/9883.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix to address indeterminacy of error message in case a module name is same as another in a separate namespace.

Refs #9883
10 changes: 6 additions & 4 deletions pylint/lint/pylinter.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,10 +666,12 @@ def check(self, files_or_modules: Sequence[str]) -> None:
)

extra_packages_paths = list(
{
discover_package_path(file_or_module, self.config.source_roots)
for file_or_module in files_or_modules
}
dict.fromkeys(
[
discover_package_path(file_or_module, self.config.source_roots)
for file_or_module in files_or_modules
]
).keys()
)

# TODO: Move the parallel invocation into step 3 of the checking process
Expand Down

0 comments on commit f2961dc

Please sign in to comment.