Skip to content

Commit 1deaffa

Browse files
Fix to maintain order of package paths (#9887) (#9897)
(cherry picked from commit 8314743) Co-authored-by: Akhil Kamat <akhil.kamat@gmail.com>
1 parent b4c2951 commit 1deaffa

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

doc/whatsnew/fragments/9883.bugfix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fix to address indeterminacy of error message in case a module name is same as another in a separate namespace.
2+
3+
Refs #9883

pylint/lint/pylinter.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -666,10 +666,12 @@ def check(self, files_or_modules: Sequence[str]) -> None:
666666
)
667667

668668
extra_packages_paths = list(
669-
{
670-
discover_package_path(file_or_module, self.config.source_roots)
671-
for file_or_module in files_or_modules
672-
}
669+
dict.fromkeys(
670+
[
671+
discover_package_path(file_or_module, self.config.source_roots)
672+
for file_or_module in files_or_modules
673+
]
674+
).keys()
673675
)
674676

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

tests/functional/r/recursion/recursion_error_3152.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
import setuptools
33

44

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

0 commit comments

Comments
 (0)