Skip to content

Commit

Permalink
Add return annotation to get_model_signature
Browse files Browse the repository at this point in the history
get_model_signature is intended as a method for obtaining the call signature of get_resolution_function, and therefore its return annotation should be a subclass of InstrumentModel
  • Loading branch information
Rastislav Turanyi committed Jan 13, 2025
1 parent d112148 commit 9690e5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/resolution_functions/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ def get_model_signature(self, model_name: Optional[str] = None) -> Signature:

params[key] = value.replace(**args, kind=Parameter.KEYWORD_ONLY)

return Signature(parameters=list(params.values()))
return Signature(parameters=list(params.values()), return_annotation=model_class)

@property
def available_models(self) -> list[str]:
Expand Down

0 comments on commit 9690e5c

Please sign in to comment.