def config(self):
        """ Allows changing the config on the fly """
        # TODO more efficient to read once and put watch on the file
        config = {}
        if self.config_file.exists():
            with open(self.config_file.as_posix(), 'rt') as f:  # 3.5/pypy3 can't open Path directly
                config = {k:self._override[k] if
                        k in self._override else
                        v for k, v in yaml.safe_load(f).items()}

        return config
def config ( self ) : config = { } if self . config_file . exists ( ) : with open ( self . config_file . as_posix ( ) , 'rt' ) as f : config = { k : self . _override [ k ] if k in self . _override else v for k , v in yaml . safe_load ( f ) . items ( ) } return config
Allows changing the config on the fly