Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #3334: Add support for custom parameter classes in mypy plugin #3335

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

starhel
Copy link
Contributor

@starhel starhel commented Jan 17, 2025

Description

Fix for custom parameter classes in mypy plugin.

Motivation and Context

I'm using custom parameter classes in my code, and I'd like to benefit from the new mypy plugin. The change is not the prettiest one but the smallest I've found.

Have you tested this? If so, how?

I've updated unittests.

Copy link
Collaborator

@dlstadther dlstadther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have issue with this change. Tests continue to pass.

Left 1 request.

@@ -109,6 +109,7 @@ def _task_parameter_field_callback(self, ctx: FunctionContext) -> Type:
# if no `default` argument is found, return AnyType with unannotated type.
except ValueError:
return AnyType(TypeOfAny.unannotated)
print(ctx.context)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove print() statements before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants