class_docstr: Responsible for parsing configuration from files and CLI.
  
  There are 2 types of configurations: Run configurations and Check
  configurations.
  
  Run Configurations:
  ------------------
  Responsible for deciding things that are related to the user interface and
  configuration discovery, e.g. verbosity, debug options, etc.
  All run configurations default to `False` or `None` and are decided only
  by CLI.
  
  Check Configurations:
  --------------------
  Configurations that are related to which files and errors will be checked.
  These are configurable in 2 ways: using the CLI, and using configuration
  files.
  
  Configuration files are nested within the file system, meaning that the
  closer a configuration file is to a checked file, the more relevant it will
  be. For instance, imagine this directory structure:
  
  A
  +-- tox.ini: sets `select=D100`
  +-- B
      +-- foo.py
      +-- tox.ini: sets `add-ignore=D100`
  
  Then `foo.py` will not be checked for `D100`.
  The configuration build algorithm is described in `self._get_config`.
  
  Note: If any of `BASE_ERROR_SELECTION_OPTIONS` was selected in the CLI, all
  configuration files will be ignored and each file will be checked for
  the error codes supplied in the CLI.
class_docstr_tok: ["Responsible","for","parsing","configuration","from","files","and","CLI",".","There","are","2","types","of","configurations",":","Run","configurations","and","Check","configurations",".","Run","Configurations",":","--","--","--","--","--","--","--","--","--","Responsible","for","deciding","things","that","are","related","to","the","user","interface","and","configuration","discovery",",","e.g",".","verbosity",",","debug","options",",","etc",".","All","run","configurations","default","to","`","False","`","or","`","None","`","and","are","decided","only","by","CLI",".","Check","Configurations",":","--","--","--","--","--","--","--","--","--","--","Configurations","that","are","related","to","which","files","and","errors","will","be","checked",".","These","are","configurable","in","2","ways",":","using","the","CLI",",","and","using","configuration","files",".","Configuration","files","are","nested","within","the","file","system",",","meaning","that","the","closer","a","configuration","file","is","to","a","checked","file",",","the","more","relevant","it","will","be",".","For","instance",",","imagine","this","directory","structure",":","A","+","--","tox.ini",":","sets","`","select=D100","`","+","--","B","+","--","foo.py","+","--","tox.ini",":","sets","`","add-ignore=D100","`","Then","`","foo.py","`","will","not","be","checked","for","`","D100","`",".","The","configuration","build","algorithm","is","described","in","`","self._get_config","`",".","Note",":","If","any","of","`","BASE_ERROR_SELECTION_OPTIONS","`","was","selected","in","the","CLI",",","all","configuration","files","will","be","ignored","and","each","file","will","be","checked","for","the","error","codes","supplied","in","the","CLI","."]
docstr: Generate files and error codes to check on each one.
  
  Walk dir trees under `self._arguments` and yield file names
  that `match` under each directory that `match_dir`.
  The method locates the configuration for each file name and yields a
  tuple of (filename, [error_codes]).
  
  With every discovery of a new configuration file `IllegalConfiguration`
  might be raised.
docstr_tok: ["Generate","files","and","error","codes","to","check","on","each","one",".","Walk","dir","trees","under","`","self._arguments","`","and","yield","file","names","that","`","match","`","under","each","directory","that","`","match_dir","`",".","The","method","locates","the","configuration","for","each","file","name","and","yields","a","tuple","of","(","filename",",","[","error_codes","]",")",".","With","every","discovery","of","a","new","configuration","file","`","IllegalConfiguration","`","might","be","raised","."]
code: def get_files_to_check(self):
      """Generate files and error codes to check on each one.
  
      Walk dir trees under `self._arguments` and yield file names
      that `match` under each directory that `match_dir`.
      The method locates the configuration for each file name and yields a
      tuple of (filename, [error_codes]).
  
      With every discovery of a new configuration file `IllegalConfiguration`
      might be raised.
  
      """
  
      def _get_matches(conf):
          """Return the `match` and `match_dir` functions for `config`."""
          match_func = re(conf.match + "$").match
          match_dir_func = re(conf.match_dir + "$").match
          return match_func, match_dir_func
  
      def _get_ignore_decorators(conf):
          """Return the `ignore_decorators` as None or regex."""
          return (
              re(conf.ignore_decorators)
              if conf.ignore_decorators
              else None
          )
  
      def _get_property_decorators(conf):
          """Return the `property_decorators` as None or set."""
          return (
              set(conf.property_decorators.split(","))
              if conf.property_decorators
              else None
          )
  
      for name in self._arguments:
          if os.path.isdir(name):
              for root, dirs, filenames in os.walk(name):
                  config = self._get_config(os.path.abspath(root))
                  match, match_dir = _get_matches(config)
                  ignore_decorators = _get_ignore_decorators(config)
                  property_decorators = _get_property_decorators(config)
  
                  # Skip any dirs that do not match match_dir
                  dirs[:] = [d for d in dirs if match_dir(d)]
  
                  for filename in map(os.path.basename, filenames):
                      if match(filename):
                          full_path = os.path.join(root, filename)
                          yield (
                              full_path,
                              list(config.checked_codes),
                              ignore_decorators,
                              property_decorators,
                              config.ignore_self_only_init,
                          )
          else:
              config = self._get_config(os.path.abspath(name))
              match, _ = _get_matches(config)
              ignore_decorators = _get_ignore_decorators(config)
              property_decorators = _get_property_decorators(config)
              if match(os.path.basename(name)):
                  yield (
                      name,
                      list(config.checked_codes),
                      ignore_decorators,
                      property_decorators,
                      config.ignore_self_only_init,
                  )
  
imports: import copy
  import itertools
  import operator
  import os
  import sys
  from collections import namedtuple
  from collections.abc import Set
  from configparser import NoOptionError, NoSectionError, RawConfigParser
  from functools import reduce
  from re import compile
  from ._version import __version__
  from .utils import log
  from .violations import ErrorRegistry, conventions
label_desc: Use image node_id 5 for calling the ConfigurationParser obj's underlying member method code with example usage: obj.get_files_to_check() and returns: match_func,  match_dir_func, unknown, unknown