Skip to content

Commit

Permalink
Fix to maintain order of package paths (#9887) (#9897)
Browse files Browse the repository at this point in the history
(cherry picked from commit 8314743)

Co-authored-by: Akhil Kamat <[email protected]>
  • Loading branch information
github-actions[bot] and akamat10 authored Aug 30, 2024
1 parent b4c2951 commit 1deaffa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 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
2 changes: 1 addition & 1 deletion tests/functional/r/recursion/recursion_error_3152.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
import setuptools


# pylint: disable=missing-docstring,too-few-public-methods
# pylint: disable=missing-docstring,too-few-public-methods,abstract-method
class Custom(setuptools.Command):
pass

0 comments on commit 1deaffa

Please sign in to comment.