docs: def _scan(self, trigger=True):
          """
          Walks through the directory to look for changes of the given file
          types.
          Returns True if changes occurred (False otherwise).
          Returns None if polling method isn't being used.
          """
          changed = False
          files_seen = set()
          os_path_join = os.path.join
          for path in self.paths:
              for root, dirs, files in os.walk(path):
                  for f in files:
                      fpath = os_path_join(root, f)
                      if not self.is_valid_type(fpath):
                          continue
                      files_seen.add(fpath)
                      if self._requires_new_modtime(fpath):
                          self._watch_file(fpath, trigger)
                          changed = True
              for f in self._watched_files:
                  if f not in files_seen:
                      self._unwatch_file(f, trigger)
                      changed = True
          return changed