def get_config(repo_root):
config = os.path.join(os.path.dirname(__file__), '<STR_LIT>', '<STR_LIT>')<EOL>if repo_root:<EOL><INDENT>repo_config = os.path.join(repo_root, '<STR_LIT>')<EOL>if os.path.exists(repo_config):<EOL><INDENT>config = repo_config<EOL><DEDENT><DEDENT>with open(config) as f:<EOL><INDENT>content = f.read()<EOL>if not content:<EOL><INDENT>yaml_config = {}<EOL><DEDENT>else:<EOL><INDENT>yaml_config = yaml.load(content)<EOL><DEDENT><DEDENT>return linters.parse_yaml_config(yaml_config, repo_root)<EOL>
Gets the configuration file either from the repository or the default.