-
-
Notifications
You must be signed in to change notification settings - Fork 459
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix type annotation for RegisterLookupMixin.class_lookups
The existing annotation (`list[dict[Any, Any]]`) is incorrect, leading to errors in any code that actually uses this attribute. The proper type is evident from the code in Django that registers class lookups[^1]: def register_class_lookup(cls, lookup, lookup_name=None): if lookup_name is None: lookup_name = lookup.lookup_name if "class_lookups" not in cls.__dict__: cls.class_lookups = {} cls.class_lookups[lookup_name] = lookup cls._clear_cached_class_lookups() return lookup Now that this is a proper type, the appropriate entries are also removed from allowlist_todo.txt. [^1]: https://github.com/django/django/blob/50e95ad5367a4a93f94a66a645f9c126f0609f0a/django/db/models/query_utils.py#L296
- Loading branch information
1 parent
7564f79
commit b78447f
Showing
2 changed files
with
2 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters