code: def _get_files_to_lint(self, external_directories):
          
          all_f = []
  
          for external_dir in external_directories:
              all_f.extend(_all_files_matching_ext(external_dir, "py"))
  
          packages = self.distribution.packages or list()
          for package in packages:
              all_f.extend(_all_files_matching_ext(package, "py"))
  
          py_modules = self.distribution.py_modules or list()
          for filename in py_modules:
              all_f.append(os.path.realpath(filename + ".py"))
  
          all_f.append(os.path.join(os.getcwd(), "setup.py"))
  
          # Remove duplicates which may exist due to symlinks or repeated
          # packages found by /setup.py
          all_f = list(set([os.path.realpath(f) for f in all_f]))
  
          exclusions = [
              "*.egg/*",
              "*.eggs/*"
          ] + self.exclusions
          return sorted([f for f in all_f if not _is_excluded(f, exclusions)])
docs: Get files to lint.