Skip to content

Incorrect Type Hint for ModelSerializer class instance attribute #718

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
JoshFerge opened this issue Jan 13, 2025 · 1 comment · May be fixed by #719
Closed

Incorrect Type Hint for ModelSerializer class instance attribute #718

JoshFerge opened this issue Jan 13, 2025 · 1 comment · May be fixed by #719
Labels
bug Something isn't working

Comments

@JoshFerge
Copy link

JoshFerge commented Jan 13, 2025

instance is not a Sequence when used in ModelSerializer code, I believe this type hint was in error.

instance: _MT | Sequence[_MT] | None # type: ignore[assignment]

it should just be instance: _MT | None

@JoshFerge
Copy link
Author

see #719 (comment)

@JoshFerge JoshFerge closed this as not planned Won't fix, can't repro, duplicate, stale Jan 14, 2025
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.

1 participant