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 [^1]: https://github.com/django/django/blob/50e95ad5367a4a93f94a66a645f9c126f0609f0a/django/db/models/query_utils.py#L296
- Loading branch information