Skip to content

Make validators consistent#3433

Merged
sobolevn merged 2 commits into
typeddjango:masterfrom
brianhelba:validators
Jun 19, 2026
Merged

Make validators consistent#3433
sobolevn merged 2 commits into
typeddjango:masterfrom
brianhelba:validators

Conversation

@brianhelba

@brianhelba brianhelba commented Jun 18, 2026

Copy link
Copy Markdown
Contributor
  • Use Iterable for parameters, since the input is never sliced as a sequence
  • Use list for attributes, since it's always actually stored as that type
  • Use consistent import of _ValidatorCallable

AI Policy

  • I have read and agree to the AI Policy, removed any "Co-Authored-By" lines attributing coding agents, and manually reviewed the final result

* Use `Iterable` for parameters, since the input is never sliced as a sequence
* Use `list` for attributes, since it's always actually stored as that type
@github-actions

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on type check results on a corpus of open source code:

zulip (https://github.com/zulip/zulip)
- zilencer/migrations/0026_auditlog_models_extra_data_json.py:17: error: Module has no attribute "serializers"  [attr-defined]
+ zilencer/migrations/0026_auditlog_models_extra_data_json.py:17: error: Module has no attribute "core"  [attr-defined]
- zilencer/migrations/0026_auditlog_models_extra_data_json.py:24: error: Module has no attribute "serializers"  [attr-defined]
+ zilencer/migrations/0026_auditlog_models_extra_data_json.py:24: error: Module has no attribute "core"  [attr-defined]
- zerver/migrations/0452_realmauditlog_extra_data_json.py:17: error: Module has no attribute "serializers"  [attr-defined]
+ zerver/migrations/0452_realmauditlog_extra_data_json.py:17: error: Module has no attribute "core"  [attr-defined]

@sobolevn sobolevn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@sobolevn sobolevn merged commit 71efc6e into typeddjango:master Jun 19, 2026
54 of 55 checks passed
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