We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f93e1c commit c9b7eb7Copy full SHA for c9b7eb7
src/structurizr/abstract_base.py
@@ -36,11 +36,14 @@ def __init__(self, **kwargs):
36
37
"""
38
if kwargs:
39
- is_plural = len(kwargs) > 1
+ phrase = (
40
+ "unexpected keyword arguments"
41
+ if len(kwargs) > 1
42
+ else "an unexpected keyword argument"
43
+ )
44
message = "\n ".join(f"{key}={value}" for key, value in kwargs.items())
45
raise TypeError(
- f"{type(self).__name__}.__init__() got {'' if is_plural else 'an '}"
- f"unexpected keyword argument{'s' if is_plural else ''}:\n {message}"
46
+ f"{type(self).__name__}.__init__() got {phrase}:\n {message}"
47
)
48
super().__init__()
49
0 commit comments