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__(
8888 type_name = type (self ).__name__
8989 args = [f"'{ key } '" for key in kwargs .keys ()]
9090 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+ )
9395 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+ )
96100
97101 super ().__init__ ()
98102 self .id = id
Original file line number Diff line number Diff line change @@ -52,14 +52,15 @@ def test_handling_of_bogus_init_params():
5252 See https://github.com/Midnighter/structurizr-python/issues/50.
5353 """
5454 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'" ,
5758 ):
5859 ConcreteModelItem (foo = 7 )
5960 with pytest .raises (
6061 TypeError ,
6162 match = r"ConcreteModelItem.__init__\(\) got unexpected keyword "
62- r"arguments 'foo', 'bar'" ,
63+ r"arguments 'foo', 'bar'" ,
6364 ):
6465 ConcreteModelItem (foo = 7 , bar = 17 )
6566
You can’t perform that action at this time.
0 commit comments