from typing import Any

from django.db import models

class ObjectTypeRegistry:
    values_by_exact_class: dict[type, Any]
    values_by_class: dict[type, Any]
    def __init__(self) -> None: ...
    def register(self, cls: type, value: Any = None, exact_class: bool = False) -> None: ...
    def get_by_type(self, cls: type) -> Any: ...
    def get(self, obj: Any) -> Any: ...

class ModelFieldRegistry(ObjectTypeRegistry):
    values_by_fk_related_model: dict[type[models.Model], Any]
    def __init__(self) -> None: ...
    def register(
        self, field_class: type, to: str | None = None, value: Any = None, exact_class: bool = False
    ) -> None: ...  # type: ignore[override]
    def foreign_key_lookup(self, field: models.ForeignKey[Any, Any]) -> Any: ...
