Skip to content

Commit

Permalink
fix: use correct argument name for exception message in Corgy.__init__
Browse files Browse the repository at this point in the history
  • Loading branch information
jayanthkoushik committed Aug 15, 2022
1 parent c3f7ca7 commit a5fa326
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions corgy/_corgy.py
Expand Up @@ -730,7 +730,7 @@ def __init__(self, **args):

for arg_name, arg_val in args.items():
if ":" in arg_name:
grp_name, arg_name = arg_name.split(":", maxsplit=1)
grp_name, arg_name_base = arg_name.split(":", maxsplit=1)
if not hasattr(self.__class__, grp_name):
raise ValueError(
f"invalid argument `{arg_name}`: "
Expand All @@ -740,7 +740,7 @@ def __init__(self, **args):
raise ValueError(
f"conflicting arguments: `{arg_name}` and `{grp_name}`"
)
grp_args_map[grp_name][arg_name] = arg_val
grp_args_map[grp_name][arg_name_base] = arg_val
elif arg_name in getattr(self, "__annotations__"):
setattr(self, arg_name, arg_val)

Expand Down

0 comments on commit a5fa326

Please sign in to comment.