(self)
Yields variant and configuration files associated with it.

        This should be treated like items of a dictionary.
Yields variant and configuration files associated with it.
Yields variant and configuration files associated with it .
def _iter_config_files(self):
        # type: () -> Iterable[Tuple[Kind, List[str]]]
        """Yields variant and configuration files associated with it.

        This should be treated like items of a dictionary.
        """
        # SMELL: Move the conditions out of this function

        # environment variables have the lowest priority
        config_file = os.environ.get('PIP_CONFIG_FILE', None)
        if config_file is not None:
            yield kinds.ENV, [config_file]
        else:
            yield kinds.ENV, []

        config_files = get_configuration_files()

        # at the base we have any global configuration
        yield kinds.GLOBAL, config_files[kinds.GLOBAL]

        # per-user configuration next
        should_load_user_config = not self.isolated and not (
            config_file and os.path.exists(config_file)
        )
        if should_load_user_config:
            # The legacy config file is overridden by the new config file
            yield kinds.USER, config_files[kinds.USER]

        # finally virtualenv configuration first trumping others
        yield kinds.SITE, config_files[kinds.SITE]
def _iter_config_files ( self ) : # type: () -> Iterable[Tuple[Kind, List[str]]] # SMELL: Move the conditions out of this function # environment variables have the lowest priority config_file = os . environ . get ( 'PIP_CONFIG_FILE' , None ) if config_file is not None : yield kinds . ENV , [ config_file ] else : yield kinds . ENV , [ ] config_files = get_configuration_files ( ) # at the base we have any global configuration yield kinds . GLOBAL , config_files [ kinds . GLOBAL ] # per-user configuration next should_load_user_config = not self . isolated and not ( config_file and os . path . exists ( config_file ) ) if should_load_user_config : # The legacy config file is overridden by the new config file yield kinds . USER , config_files [ kinds . USER ] # finally virtualenv configuration first trumping others yield kinds . SITE , config_files [ kinds . SITE ]