class_docstr: The environment in which the ReST files are translated.
  Stores an inventory of cross-file targets and provides doctree
  transformations to resolve links to them.
class_docstr_tok: ["The","environment","in","which","the","ReST","files","are","translated",".","Stores","an","inventory","of","cross-file","targets","and","provides","doctree","transformations","to","resolve","links","to","them","."]
docstr: Find all source files in the source dir and put them in
  self.found_docs.
code: def find_files(self, config: Config, builder: Builder) -> None:
      """Find all source files in the source dir and put them in
      self.found_docs.
      """
      try:
          exclude_paths = (
              self.config.exclude_patterns
              + self.config.templates_path
              + builder.get_asset_paths()
          )
          self.project.discover(
              exclude_paths, self.config.include_patterns
          )
  
          # Current implementation is applying translated messages in the reading
          # phase.Therefore, in order to apply the updated message catalog, it is
          # necessary to re-process from the reading phase. Here, if dependency
          # is set for the doc source and the mo file, it is processed again from
          # the reading phase when mo is updated. In the future, we would like to
          # move i18n process into the writing phase, and remove these lines.
          if builder.use_message_catalog:
              # add catalog mo file dependency
              repo = CatalogRepository(
                  self.srcdir,
                  self.config.locale_dirs,
                  self.config.language,
                  self.config.source_encoding,
              )
              mo_paths = {c.domain: c.mo_path for c in repo.catalogs}
              for docname in self.found_docs:
                  domain = docname_to_domain(
                      docname, self.config.gettext_compact
                  )
                  if domain in mo_paths:
                      self.dependencies[docname].add(mo_paths[domain])
      except OSError as exc:
          raise DocumentError(
              __("Failed to scan documents in %s: %r")
              % (self.srcdir, exc)
          ) from exc
  
imports: from __future__ import annotations
  import functools
  import os
  import pickle
  import time
  from collections import defaultdict
  from copy import copy
  from os import path
  from typing import TYPE_CHECKING, Any, Callable, NoReturn
  from sphinx import addnodes
  from sphinx.environment.adapters import toctree
  from sphinx.errors import BuildEnvironmentError, DocumentError, ExtensionError, SphinxError
  from sphinx.locale import __
  from sphinx.transforms import SphinxTransformer
  from sphinx.util import DownloadFiles, FilenameUniqDict, logging
  from sphinx.util.docutils import LoggingReporter
  from sphinx.util.i18n import CatalogRepository, docname_to_domain
  from sphinx.util.nodes import is_translatable
  from sphinx.util.osutil import canon_path, os_path
label_desc: Use image node_id 14 for calling the BuildEnvironment obj's underlying member method code with example usage: obj.find_files(config, builder) without return types