From 9fbbeb39da425dd5709cdaaf32dad3447a226569 Mon Sep 17 00:00:00 2001 From: Ricardo Lopes Date: Fri, 23 May 2025 14:17:00 +0100 Subject: [PATCH] Fix typed signature validation --- pythonwhat/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pythonwhat/tasks.py b/pythonwhat/tasks.py index 35c87ac..3516ff7 100644 --- a/pythonwhat/tasks.py +++ b/pythonwhat/tasks.py @@ -134,7 +134,8 @@ def get_signature(name, mapped_name, signature, manual_sigs, env): except: raise InstructorError.from_message(e.args[0] + " and cannot determine signature") - return signature + params = [param.replace(annotation=inspect._empty) for param in signature.parameters.values()] + return signature.replace(parameters=params) # Get the signature of a function based on an object inside the process