Skip to content

Col.__init__ has wrong type for argument target #830

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

Closed
jerch opened this issue Jan 25, 2022 · 2 comments
Closed

Col.__init__ has wrong type for argument target #830

jerch opened this issue Jan 25, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@jerch
Copy link

jerch commented Jan 25, 2022

Bug report

What's wrong

This is the current Col type declaration:

class Col(Expression):
def __init__(self, alias: str, target: str, output_field: Optional[_OutputField] = ...): ...

Looking at django sources, target is meant to be a Field type, not str.

How is that should be

Make target a Field type.

@jerch jerch added the bug Something isn't working label Jan 25, 2022
@jerch jerch changed the title Col.__init__ has wrong argument type for target Col.__init__ has wrong type for argument target Jan 25, 2022
@sobolevn
Copy link
Member

PR is welcome!

himanshu-balasamanta added a commit to himanshu-balasamanta/django-stubs that referenced this issue Mar 10, 2022
Signed-off-by: Himanshu-Balasamanta <[email protected]>
himanshu-balasamanta added a commit to himanshu-balasamanta/django-stubs that referenced this issue Mar 10, 2022
Signed-off-by: Himanshu-Balasamanta <[email protected]>
@sobolevn
Copy link
Member

Fixed in #909

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants