bugwarrior/config.py
def get_config_path():
    """
    Determine the path to the config file. This will return, in this order of
    precedence:
    - the value of $BUGWARRIORRC if set
    - $XDG_CONFIG_HOME/bugwarrior/bugwarriorc if exists
    - ~/.bugwarriorrc if exists
    - <dir>/bugwarrior/bugwarriorc if exists, for dir in $XDG_CONFIG_DIRS
    - $XDG_CONFIG_HOME/bugwarrior/bugwarriorc otherwise
    """
    if os.environ.get(BUGWARRIORRC):
        return os.environ[BUGWARRIORRC]
    xdg_config_home = (
        os.environ.get('XDG_CONFIG_HOME') or os.path.expanduser('~/.config'))
    xdg_config_dirs = (
        (os.environ.get('XDG_CONFIG_DIRS') or '/etc/xdg').split(':'))
    paths = [
        os.path.join(xdg_config_home, 'bugwarrior', 'bugwarriorrc'),
        os.path.expanduser("~/.bugwarriorrc")]
    paths += [
        os.path.join(d, 'bugwarrior', 'bugwarriorrc') for d in xdg_config_dirs]
    for path in paths:
        if os.path.exists(path):
            return path
    return paths[0]
def get_config_path():
    """
    Determine the path to the config file. This will return, in this order of
    precedence:
    - the value of $BUGWARRIORRC if set
    - $XDG_CONFIG_HOME/bugwarrior/bugwarriorc if exists
    - ~/.bugwarriorrc if exists
    - <dir>/bugwarrior/bugwarriorc if exists, for dir in $XDG_CONFIG_DIRS
    - $XDG_CONFIG_HOME/bugwarrior/bugwarriorc otherwise
    """
    if os.environ.get(BUGWARRIORRC):
        return os.environ[BUGWARRIORRC]
    xdg_config_home = (
        os.environ.get('XDG_CONFIG_HOME') or os.path.expanduser('~/.config'))
    xdg_config_dirs = (
        (os.environ.get('XDG_CONFIG_DIRS') or '/etc/xdg').split(':'))
    paths = [
        os.path.join(xdg_config_home, 'bugwarrior', 'bugwarriorrc'),
        os.path.expanduser("~/.bugwarriorrc")]
    paths += [
        os.path.join(d, 'bugwarrior', 'bugwarriorrc') for d in xdg_config_dirs]
    for path in paths:
        if os.path.exists(path):
            return path
    return paths[0]
def get_config_path ( ) : if os . environ . get ( BUGWARRIORRC ) : return os . environ [ BUGWARRIORRC ] xdg_config_home = ( os . environ . get ( 'XDG_CONFIG_HOME' ) or os . path . expanduser ( '~/.config' ) ) xdg_config_dirs = ( ( os . environ . get ( 'XDG_CONFIG_DIRS' ) or '/etc/xdg' ) . split ( ':' ) ) paths = [ os . path . join ( xdg_config_home , 'bugwarrior' , 'bugwarriorrc' ) , os . path . expanduser ( "~/.bugwarriorrc" ) ] paths += [ os . path . join ( d , 'bugwarrior' , 'bugwarriorrc' ) for d in xdg_config_dirs ] for path in paths : if os . path . exists ( path ) : return path return paths [ 0 ]
Determine the path to the config file. This will return, in this order of
    precedence:
    - the value of $BUGWARRIORRC if set
    - $XDG_CONFIG_HOME/bugwarrior/bugwarriorc if exists
    - ~/.bugwarriorrc if exists
    - <dir>/bugwarrior/bugwarriorc if exists, for dir in $XDG_CONFIG_DIRS
    - $XDG_CONFIG_HOME/bugwarrior/bugwarriorc otherwise
Determine the path to the config file . This will return in this order of precedence : - the value of $BUGWARRIORRC if set - $XDG_CONFIG_HOME / bugwarrior / bugwarriorc if exists - ~ / . bugwarriorrc if exists - <dir > / bugwarrior / bugwarriorc if exists for dir in $XDG_CONFIG_DIRS - $XDG_CONFIG_HOME / bugwarrior / bugwarriorc otherwise