File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/service-library/src/servicelib Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -133,17 +133,17 @@ def _get_context(args: Any, kwargs: dict) -> Context:
133133 sub_args = arg .split ("." )
134134 main_arg = sub_args [0 ]
135135 if main_arg not in search_args :
136- raise ValueError (
136+ msg = (
137137 f"Expected '{ main_arg } ' in '{ decorated_function .__name__ } '"
138138 f" arguments. Got '{ search_args } '"
139139 )
140+ raise ValueError (msg )
140141 context_key = search_args [main_arg ]
141142 for attribute in sub_args [1 :]:
142143 potential_key = getattr (context_key , attribute )
143144 if not potential_key :
144- raise ValueError (
145- f"Expected '{ attribute } ' attribute in '{ context_key .__name__ } ' arguments."
146- )
145+ msg = f"Expected '{ attribute } ' attribute in '{ context_key .__name__ } ' arguments."
146+ raise ValueError (msg )
147147 context_key = potential_key
148148
149149 key_parts .append (f"{ decorated_function .__name__ } _{ context_key } " )
You can’t perform that action at this time.
0 commit comments