Skip to content

Typings for Field attributes #31

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
kalekseev opened this issue Aug 26, 2019 · 6 comments
Closed

Typings for Field attributes #31

kalekseev opened this issue Aug 26, 2019 · 6 comments
Labels
bug Something isn't working

Comments

@kalekseev
Copy link
Contributor

Currently a lot of Field's attributes are not exposed in types, eg:

error: "ChoiceField" has no attribute "field_name"
error: "Field" has no attribute "allow_blank"
error: "Field" has no attribute "allow_null"
error: "Field" has no attribute "default"; maybe "get_default"?
error: "Field" has no attribute "read_only"
error: "Field" has no attribute "required"

that cause a lot of headache when serializers modified dynamically.

@sobolevn sobolevn added the bug Something isn't working label Aug 27, 2019
@stevanmilic
Copy link
Contributor

@sobolevn I would like to fix this. I'll provide a PR that passes the pipeline.

@kalekseev
Copy link
Contributor Author

@stevanmilic I created a pr but it wasn't merged and after some of the fields were fixed in master it has merge conflict. You can use that pr as starting point.

@kalekseev
Copy link
Contributor Author

@stevanmilic
Copy link
Contributor

Yea seen it, I was planning to re-use it 👍 thanks

@stevanmilic
Copy link
Contributor

@kalekseev I've just taken a look at master branch, it looks like the attributes are added in 2112425#diff-279543faf36724e6286925cb91487e5e commit, we can close this issue.

@sobolevn
Copy link
Member

sobolevn commented Apr 8, 2020

Yes, I have merged it today. Sorry for the delay!

@sobolevn sobolevn closed this as completed Apr 8, 2020
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.

3 participants