summaryrefslogtreecommitdiff
path: root/git/config.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-07-09 11:40:32 +0100
committerYobmod <yobmod@gmail.com>2021-07-09 11:40:32 +0100
commit937746291cfdaa40938de03db305b1137c391907 (patch)
tree6f28d6c757cc33f5dadec2635d4d0e63856e2942 /git/config.py
parent5eea8910b2e07d424a2e33299149d13392a80a54 (diff)
downloadgitpython-937746291cfdaa40938de03db305b1137c391907.tar.gz
Make has_repo protocol runtime checkable and use in Diffable
Diffstat (limited to 'git/config.py')
-rw-r--r--git/config.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/git/config.py b/git/config.py
index 19ce1f84..2c863f93 100644
--- a/git/config.py
+++ b/git/config.py
@@ -234,8 +234,8 @@ def get_config_path(config_level: Lit_config_levels) -> str:
elif config_level == "repository":
raise ValueError("No repo to get repository configuration from. Use Repo._get_config_path")
else:
- # Should not reach here. Will raise ValueError if does. Static typing will warn about extra and missing elifs
- assert_never(config_level, ValueError("Invalid configuration level: %r" % config_level))
+ # Should not reach here. Will raise ValueError if does. Static typing will warn missing elifs
+ assert_never(config_level, ValueError(f"Invalid configuration level: {config_level!r}"))
class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser, object)): # type: ignore ## mypy does not understand dynamic class creation # noqa: E501