From 15be85988354dea0e51c0855d5ed08bf63a399ea Mon Sep 17 00:00:00 2001 From: akamat10 Date: Tue, 20 Aug 2024 23:10:33 -0400 Subject: [PATCH] Fix to maintain order of package paths --- pylint/lint/pylinter.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pylint/lint/pylinter.py b/pylint/lint/pylinter.py index 6bba99031a..cc4605b96a 100644 --- a/pylint/lint/pylinter.py +++ b/pylint/lint/pylinter.py @@ -665,10 +665,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