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

Form.changed_data is not callable fixes #148 #149

Merged
merged 1 commit into from
Aug 30, 2019

Conversation

jaredlockhart
Copy link
Contributor

When trying to annotate references to changed_data I noticed that mypy suggests its type should be Callable[[BaseForm], List[str]] but since it's an @cached_property it is not callable, so it should be List[str].

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Thanks a lot! Good catch.

@@ -29,6 +29,7 @@ class BaseForm:
fields: Dict[str, Any] = ...
renderer: BaseRenderer = ...
cleaned_data: Any = ...
changed_data: List[str]: ...
Copy link
Member

Choose a reason for hiding this comment

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

Can we make it a @propery? I guess it is the closest match.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh good idea, I changed it 👍

@sobolevn sobolevn merged commit b8379d4 into typeddjango:master Aug 30, 2019
@sobolevn
Copy link
Member

Thanks!

@jaredlockhart
Copy link
Contributor Author

@sobolevn Thanks for merging! When will the next tag be released with this change?

@sobolevn
Copy link
Member

sobolevn commented Sep 3, 2019

Sorry, we don't have any release schedule yet. Can you use master for now?

@mkurnikov can you please help us here?

voidus pushed a commit to voidus/django-stubs that referenced this pull request Apr 23, 2024
Hello, 

this PR actually makes two changes:

- add the missing `EmptyFieldListFilter`.
- fix the model `Index` class which also accepts positional parameters.

I am not sure if this is the right way to contribute to this repository.

- Is it ok to submit both changes in a single PR?
- How can I be sure everything is working fine? (a.k.a. tests)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants