This repository was archived by the owner on Jan 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -88,11 +88,15 @@ def __init__(
88
88
type_name = type (self ).__name__
89
89
args = [f"'{ key } '" for key in kwargs .keys ()]
90
90
if len (args ) == 1 :
91
- raise TypeError (f"{ type_name } .__init__() got an unexpected "
92
- f"keyword argument { args [0 ]} " )
91
+ raise TypeError (
92
+ f"{ type_name } .__init__() got an unexpected "
93
+ f"keyword argument { args [0 ]} "
94
+ )
93
95
else :
94
- raise TypeError (f"{ type_name } .__init__() got unexpected "
95
- f"keyword arguments { ', ' .join (args )} " )
96
+ raise TypeError (
97
+ f"{ type_name } .__init__() got unexpected "
98
+ f"keyword arguments { ', ' .join (args )} "
99
+ )
96
100
97
101
super ().__init__ ()
98
102
self .id = id
Original file line number Diff line number Diff line change @@ -52,14 +52,15 @@ def test_handling_of_bogus_init_params():
52
52
See https://github.com/Midnighter/structurizr-python/issues/50.
53
53
"""
54
54
with pytest .raises (
55
- TypeError , match = r"ConcreteModelItem.__init__\(\) got an unexpected "
56
- r"keyword argument 'foo'"
55
+ TypeError ,
56
+ match = r"ConcreteModelItem.__init__\(\) got an unexpected "
57
+ r"keyword argument 'foo'" ,
57
58
):
58
59
ConcreteModelItem (foo = 7 )
59
60
with pytest .raises (
60
61
TypeError ,
61
62
match = r"ConcreteModelItem.__init__\(\) got unexpected keyword "
62
- r"arguments 'foo', 'bar'" ,
63
+ r"arguments 'foo', 'bar'" ,
63
64
):
64
65
ConcreteModelItem (foo = 7 , bar = 17 )
65
66
You can’t perform that action at this time.
0 commit comments