@@ -637,23 +637,12 @@ def _discover_files(self, files_or_modules: Sequence[str]) -> Iterator[str]:
637637 else :
638638 yield something
639639
640- def check (self , files_or_modules : Sequence [str ] | str ) -> None :
640+ def check (self , files_or_modules : Sequence [str ]) -> None :
641641 """Main checking entry: check a list of files or modules from their name.
642642
643643 files_or_modules is either a string or list of strings presenting modules to check.
644644 """
645- # 1) Initialize
646645 self .initialize ()
647-
648- # 2) Gather all files
649- if not isinstance (files_or_modules , (list , tuple )):
650- # TODO: 3.0: Remove deprecated typing and update docstring
651- warnings .warn (
652- "In pylint 3.0, the checkers check function will only accept sequence of string" ,
653- DeprecationWarning ,
654- stacklevel = 2 ,
655- )
656- files_or_modules = (files_or_modules ,) # type: ignore[assignment]
657646 if self .config .recursive :
658647 files_or_modules = tuple (self ._discover_files (files_or_modules ))
659648 if self .config .from_stdin :
@@ -669,7 +658,7 @@ def check(self, files_or_modules: Sequence[str] | str) -> None:
669658 }
670659 )
671660
672- # TODO: Move the parallel invocation into step 5 of the checking process
661+ # TODO: Move the parallel invocation into step 3 of the checking process
673662 if not self .config .from_stdin and self .config .jobs > 1 :
674663 original_sys_path = sys .path [:]
675664 check_parallel (
@@ -681,7 +670,7 @@ def check(self, files_or_modules: Sequence[str] | str) -> None:
681670 sys .path = original_sys_path
682671 return
683672
684- # 3 ) Get all FileItems
673+ # 1 ) Get all FileItems
685674 with augmented_sys_path (extra_packages_paths ):
686675 if self .config .from_stdin :
687676 fileitems = self ._get_file_descr_from_stdin (files_or_modules [0 ])
@@ -693,10 +682,10 @@ def check(self, files_or_modules: Sequence[str] | str) -> None:
693682 # The contextmanager also opens all checkers and sets up the PyLinter class
694683 with augmented_sys_path (extra_packages_paths ):
695684 with self ._astroid_module_checker () as check_astroid_module :
696- # 4 ) Get the AST for each FileItem
685+ # 2 ) Get the AST for each FileItem
697686 ast_per_fileitem = self ._get_asts (fileitems , data )
698687
699- # 5 ) Lint each ast
688+ # 3 ) Lint each ast
700689 self ._lint_files (ast_per_fileitem , check_astroid_module )
701690
702691 def _get_asts (
0 commit comments