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

Declare ManyToManyField.description a _StrOrPromise #2312

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

flaeppe
Copy link
Member

@flaeppe flaeppe commented Aug 2, 2024

@@ -242,7 +242,7 @@ _Through = TypeVar("_Through", bound=Model)
_To = TypeVar("_To", bound=Model)

class ManyToManyField(RelatedField[Any, Any], Generic[_To, _Through]):
description: str
description: _StrOrPromise
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it is a good time to use StrOrPromise instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you mean importing it from django_stubs_ext?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, this is non blocking. We can do this later.

Copy link
Member Author

Choose a reason for hiding this comment

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

Perhaps we should do the whole file at once? To not introduce any ambiguity?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I agree :)
Maybe even for the whole project.

@sobolevn sobolevn merged commit 2f4c99a into typeddjango:master Aug 2, 2024
36 checks passed
@flaeppe flaeppe deleted the fix/m2m-description branch August 2, 2024 18:37
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