from typing import Any, Dict, Generic, MutableMapping, Sequence, Type, TypeVar

from django.db import models

NUMERIC_FIELD_TYPES: Sequence[Type[models.Field[Any, Any]]] = ...

_K = TypeVar("_K", bound=type)
_V = TypeVar("_V")

class ClassLookupDict(Generic[_K, _V]):
    mapping: MutableMapping[Type[_K], _V]
    def __init__(self, mapping: MutableMapping[Type[_K], _V]): ...
    def __getitem__(self, key: _K) -> _V: ...
    def __setitem__(self, key: _K, value: _V) -> None: ...

def needs_label(model_field: models.Field[Any, Any], field_name: str) -> bool: ...
def get_detail_view_name(model: models.Model) -> str: ...
def get_field_kwargs(field_name: str, model_field: models.Field[Any, Any]) -> Dict[str, Any]: ...
def get_relation_kwargs(field_name: str, relation_info: Any) -> Dict[str, Any]: ...
def get_nested_relation_kwargs(relation_info: Any) -> Dict[str, Any]: ...
def get_url_kwargs(model_field: models.Model) -> Dict[str, Any]: ...
