MCPcopy Index your code

hub / github.com/typeddjango/django-stubs / functions

Functions440 in github.com/typeddjango/django-stubs

↓ 16 callersMethodlookup_typeinfo
(self, fullname: str)
mypy_django_plugin/transformers/models.py:67
↓ 13 callersMethodlookup_typeinfo_or_incomplete_defn_error
(self, fullname: str)
mypy_django_plugin/transformers/models.py:70
↓ 11 callersMethodget_field_related_model_cls
(self, field: RelatedField[Any, Any] | ForeignObjectRel)
mypy_django_plugin/django/context.py:371
↓ 10 callersMethodadd_new_var_to_model_class
( self, name: str, typ: MypyType, *, no_serialize: bool = False, is_classvar: bool = False )
mypy_django_plugin/transformers/models.py:90
↓ 9 callersMethod_new_dependency
(self, module: str, priority: int = PRI_MYPY)
mypy_django_plugin/main.py:92
↓ 8 callersFunctionget_django_metadata
(model_info: TypeInfo)
mypy_django_plugin/lib/helpers.py:85
↓ 8 callersMethodget_model_class_by_fullname
Returns None if Model is abstract
mypy_django_plugin/django/context.py:134
↓ 8 callersMethodget_primary_key_field
(self, model_cls: type[Model])
mypy_django_plugin/django/context.py:192
↓ 8 callersFunctionwrite_to_file
(file_contents: str, suffix: str | None = None)
tests/test_error_handling.py:41
↓ 7 callersMethod_get_typeinfo_or_none
(self, class_name: str)
mypy_django_plugin/main.py:86
↓ 7 callersFunctionexit_with_error
Using mypy's argument parser, raise `SystemExit` to fail hard if validation fails. Considering that the plugin's startup duration is around doubl
mypy_django_plugin/config.py:48
↓ 6 callersMethodget_model_fields
(self, model_cls: type[Model])
mypy_django_plugin/django/context.py:139
↓ 6 callersFunctionto_named_seq
(func: Callable[[], _T])
tests/assert_type/forms/test_fields_choices.py:15
↓ 5 callersFunctionget_annotated_type
Get a model type that can be used to represent an annotated model
mypy_django_plugin/transformers/models.py:1157
↓ 5 callersFunctionget_field_descriptor_types
( field_info: TypeInfo, *, is_set_nullable: bool, is_get_nullable: bool )
mypy_django_plugin/transformers/fields.py:122
↓ 5 callersFunctionlookup_fully_qualified_typeinfo
(api: TypeChecker | SemanticAnalyzer, fullname: str)
mypy_django_plugin/lib/helpers.py:198
↓ 5 callersFunctionset_descriptor_types_for_field
( ctx: FunctionContext, *, is_set_nullable: bool = False, is_get_nullable: bool = False )
mypy_django_plugin/transformers/fields.py:139
↓ 4 callersFunction_defer
()
mypy_django_plugin/transformers/managers.py:522
↓ 4 callersFunction_try_replace_label
Attempt to replace a label with a modified version. If there are no lazy strings for labels, remove the lazy string type, and vice-versa.
mypy_django_plugin/transformers/choices.py:105
↓ 4 callersMethodchoices
(self, changelist: ChangeList)
tests/assert_type/contrib/admin/test_filters.py:42
↓ 4 callersMethodget_field_nullability
(self, field: Field[Any, Any] | ForeignObjectRel, method: str | None)
mypy_django_plugin/django/context.py:295
↓ 3 callersFunction_extract_field_names_from_collection
( ctx: MethodContext, django_context: DjangoContext, arg_index: int )
mypy_django_plugin/transformers/querysets.py:992
↓ 3 callersFunction_extract_field_names_from_varargs
(ctx: MethodContext)
mypy_django_plugin/transformers/querysets.py:1009
↓ 3 callersFunction_is_lazy_string
(ty: MypyType | None)
mypy_django_plugin/transformers/choices.py:59
↓ 3 callersFunction_replace_type_var
Substitutes a specified type variable within a Mypy type expression with an actual type. This function is recursive, and it operates on vari
mypy_django_plugin/transformers/managers.py:234
↓ 3 callersFunction_try_replace_value
Attempt to replace a label with a modified version. If the value is of any type, then attempt to use the base type of the choices type.
mypy_django_plugin/transformers/choices.py:129
↓ 3 callersMethodadd_new_class_for_current_module
(self, name: str, bases: list[Instance])
mypy_django_plugin/transformers/models.py:97
↓ 3 callersMethodfrom_model_type
(cls, model_type: Instance, django_context: DjangoContext)
mypy_django_plugin/lib/helpers.py:240
↓ 3 callersFunctionfunc
(x: int)
tests/assert_type/db/test_transaction.py:20
↓ 3 callersFunctiongather_expression_types
(ctx: MethodContext)
mypy_django_plugin/transformers/querysets.py:351
↓ 3 callersMethodget_field_get_type
Get a type of __get__ for this specific Django field.
mypy_django_plugin/django/context.py:337
↓ 3 callersFunctionget_field_type_from_lookup
( ctx: MethodContext, django_context: DjangoContext, model_cls: type[Model], *, method: st
mypy_django_plugin/transformers/querysets.py:89
↓ 3 callersFunctionget_field_type_from_model_type_info
(info: TypeInfo | None, field_name: str)
mypy_django_plugin/django/context.py:85
↓ 3 callersFunctionis_model_type
(info: TypeInfo)
mypy_django_plugin/lib/helpers.py:709
↓ 3 callersFunctionmake_generic_classes
( request: pytest.FixtureRequest, monkeypatch: pytest.MonkeyPatch, )
ext/tests/test_monkeypatching.py:29
↓ 3 callersMethodrefresh_from_db
( self, using: str | None = None, fields: Iterable[str] | None = None, from_qu
tests/assert_type/db/models/test_base.py:27
↓ 3 callersFunctionreparametrize_generic_class
Add implicit generics to classes that are defined without generic. When ``bind_explicit_args`` is True, also reparametrize partially or
mypy_django_plugin/transformers/managers.py:615
↓ 3 callersFunctionresolve_field_lookups
(lookup_exprs: Sequence[Expression], django_context: DjangoContext)
mypy_django_plugin/transformers/querysets.py:520
↓ 3 callersMethodresolve_lookup_into_field
( self, model_cls: type[Model], lookup: str )
mypy_django_plugin/django/context.py:456
↓ 3 callersFunctiontypecheck_model_method
Type-checks positional and keyword arguments for Model methods like __init__(), create(), and acreate().
mypy_django_plugin/transformers/init_create.py:38
↓ 3 callersFunctionvalidate_non_pk_concrete_field
Check that ``field_name`` is a concrete, non-primary-key field of ``model_cls``. Mirrors Django's ``Options._non_pk_concrete_field_names``: the s
mypy_django_plugin/lib/field_validation.py:52
↓ 2 callersFunction_get_abstract_base_user
(api: SemanticAnalyzer)
mypy_django_plugin/transformers/auth.py:20
↓ 2 callersFunction_get_annotated_fields_from_queryset_type
Derive annotated field names from a QuerySet type. Sources: - args[0].extra_attrs: from .annotate() calls - args[1].extra_attrs:
mypy_django_plugin/transformers/querysets.py:727
↓ 2 callersFunction_get_annotation_field_types
Extract annotation field types from an annotated model's TypedDict type argument.
mypy_django_plugin/transformers/querysets.py:530
↓ 2 callersFunction_get_current_field_from_assignment
( ctx: FunctionContext, django_context: DjangoContext )
mypy_django_plugin/transformers/fields.py:23
↓ 2 callersFunction_get_fallback_typeddict
(api: SemanticAnalyzer | CheckerPluginInterface)
mypy_django_plugin/lib/helpers.py:565
↓ 2 callersFunction_get_selected_fields_from_queryset_type
Derive selected field names from a QuerySet type. Sources: - values(): encoded in the row TypedDict keys - values_list(named=Tru
mypy_django_plugin/transformers/querysets.py:699
↓ 2 callersFunction_is_omitted_generic
True if ``arg`` is the ``Any`` mypy substitutes for an unparametrized generic.
mypy_django_plugin/transformers/managers.py:609
↓ 2 callersFunction_resolve_annotate_row_type
( api: TypeChecker, default_return_type: Instance, annotated_model: ProperType, expression_typ
mypy_django_plugin/transformers/querysets.py:411
↓ 2 callersMethod_resolve_field_from_parts
( self, field_parts: Iterable[str], model_cls: type[Model] )
mypy_django_plugin/django/context.py:398
↓ 2 callersMethod_resolve_lookup_type_from_lookup_class
Resolve the expected type for a lookup class (used both for regular fields and annotated fields) Args: ctx lookup_cls
mypy_django_plugin/django/context.py:467
↓ 2 callersFunction_resolve_prefetch_string_argument
( type_arg: MypyType, expr: Expression | None, django_context: DjangoContext, arg_name: str, )
mypy_django_plugin/transformers/querysets.py:606
↓ 2 callersFunction_specialize_string_arg_to_literal
Helper to specialize a string argument to a Literal[str] type. This allows the plugin to extract the actual string value for further process
mypy_django_plugin/transformers/querysets.py:647
↓ 2 callersFunctionadd_new_class_for_module
( module: MypyFile, name: str, bases: list[Instance], fields: dict[str, MypyType] | None = Non
mypy_django_plugin/lib/helpers.py:476
↓ 2 callersMethodatomic_method1
(self, abc: int)
tests/assert_type/db/test_transaction.py:57
↓ 2 callersFunctionbytes_iterator
()
tests/assert_type/views/test_function_based_views.py:88
↓ 2 callersFunctioncheck_conflicting_lookups
( ctx: MethodContext, observed_attr: str, qs_types: dict[str, Instance | None], queryset_type:
mypy_django_plugin/transformers/querysets.py:874
↓ 2 callersFunctioncheck_field_concrete
(ctx: MethodContext, field: _AnyField, field_name: str, method: str)
mypy_django_plugin/lib/field_validation.py:25
↓ 2 callersFunctioncheck_valid_attr_value
Check if adding `attr_name` would conflict with existing symbols on `model`. Args: - model: The Django model being analyzed
mypy_django_plugin/transformers/querysets.py:750
↓ 2 callersFunctioncheck_valid_prefetch_related_lookup
Check if a lookup string resolve to something that can be prefetched
mypy_django_plugin/transformers/querysets.py:804
↓ 2 callersMethodcreate_autofield
( self, auto_field: Field[Any, Any], dest_name: str, existing_field: bool,
mypy_django_plugin/transformers/models.py:289
↓ 2 callersFunctioncreate_manager_class
( api: SemanticAnalyzer, base_manager_info: TypeInfo, name: str, line: int, with_unique_name: bool )
mypy_django_plugin/transformers/managers.py:439
↓ 2 callersFunctioncreate_manager_info_from_from_queryset_call
Extract manager and queryset TypeInfo from a from_queryset call.
mypy_django_plugin/transformers/managers.py:363
↓ 2 callersMethodcreate_many_related_manager
Creates a generic manager that subclasses both 'ManyRelatedManager' and the default manager of the given model. These are normally us
mypy_django_plugin/transformers/models.py:946
↓ 2 callersMethodget_expected_types
(self, api: TypeChecker, model_cls: type[Model], *, method: str)
mypy_django_plugin/django/context.py:199
↓ 2 callersMethodget_field_lookup_exact_type
(self, api: TypeChecker, field: Field[Any, Any] | ForeignObjectRel)
mypy_django_plugin/django/context.py:161
↓ 2 callersMethodget_field_set_type
Get a type of __set__ for this specific Django field.
mypy_django_plugin/django/context.py:312
↓ 2 callersMethodget_generated_manager_mappings
(self, base_manager_fullname: str)
mypy_django_plugin/transformers/models.py:107
↓ 2 callersMethodget_manager_expression
(self, name: str)
mypy_django_plugin/transformers/models.py:434
↓ 2 callersMethodget_pk_instance
Get a primary key instance of provided model's type info. If primary key can't be resolved, return a default declaration.
mypy_django_plugin/transformers/models.py:818
↓ 2 callersMethodlookup_class_typeinfo_or_incomplete_defn_error
(self, klass: type)
mypy_django_plugin/transformers/models.py:76
↓ 2 callersMethodmake
(cls, lazy: bool | None)
mypy_django_plugin/transformers/choices.py:55
↓ 2 callersFunctionmixed_iterator
()
tests/assert_type/views/test_function_based_views.py:102
↓ 2 callersFunctionobject_iterator
()
tests/assert_type/views/test_function_based_views.py:95
↓ 2 callersFunctionparse_bool
(expr: Expression)
mypy_django_plugin/lib/helpers.py:387
↓ 2 callersFunctionpopulate_manager_from_queryset
Add methods from the QuerySet class to the manager.
mypy_django_plugin/transformers/managers.py:466
↓ 2 callersFunctionregister_dynamically_created_manager
(fullname: str, manager_name: str, manager_base: TypeInfo)
mypy_django_plugin/transformers/managers.py:354
↓ 2 callersFunctionreparametrize_related_field_type
(related_field_type: Instance, set_type: MypyType, get_type: MypyType)
mypy_django_plugin/transformers/fields.py:51
↓ 2 callersFunctionresolve_manager_method_from_instance
(instance: Instance, method_name: str, ctx: AttributeContext)
mypy_django_plugin/transformers/managers.py:283
↓ 2 callersMethodsolve_lookup_type
( self, model_cls: type[Model], lookup: str )
mypy_django_plugin/django/context.py:422
↓ 2 callersFunctionstr_iterator
()
tests/assert_type/views/test_function_based_views.py:81
↓ 2 callersFunctionto_named_mapping
(func: Callable[[], _T])
tests/assert_type/forms/test_fields_choices.py:22
↓ 2 callersFunctiontry_get_field
( ctx: MethodContext, model_cls: type[Model], field_name: str, *, resolve_pk: bool = False )
mypy_django_plugin/lib/field_validation.py:13
↓ 1 callersFunction_aggregate_default_alias
Mirror `Aggregate.default_alias`: ``<source_expression>__<aggregate_name_lower>``. Django generates a default alias only for aggregates with a si
mypy_django_plugin/transformers/querysets.py:232
↓ 1 callersFunction_extract_model_type_var_upper_bound
When the queryset's model type arg is a TypeVar bounded by a Model, return the upper bound.
mypy_django_plugin/transformers/querysets.py:396
↓ 1 callersFunction_get_class_init_type
(call: CallExpr)
mypy_django_plugin/lib/helpers.py:289
↓ 1 callersMethod_get_current_form_bases
(self)
mypy_django_plugin/main.py:76
↓ 1 callersFunction_get_enum_members
(info: TypeInfo)
mypy_django_plugin/transformers/choices.py:31
↓ 1 callersFunction_get_enum_type_from_union_of_literals
Attempts to resolve a single enum type from a union of enum literals. If this cannot be resolved, the original is returned.
mypy_django_plugin/transformers/choices.py:151
↓ 1 callersFunction_get_field_get_type_from_model_type_info
(info: TypeInfo | None, field_name: str)
mypy_django_plugin/django/context.py:107
↓ 1 callersFunction_get_field_set_type_from_model_type_info
(info: TypeInfo | None, field_name: str)
mypy_django_plugin/django/context.py:100
↓ 1 callersFunction_get_funcdef_type
(definition: Node | None)
mypy_django_plugin/transformers/managers.py:175
↓ 1 callersFunction_get_module_from_pyi
(pyi_path: str)
tests/test_generic_consistency.py:93
↓ 1 callersFunction_get_need_generic
Symbols in `django.contrib.auth.forms` are very hard to patch automatically because we end up importing the User model and it crashes if `dja
tests/test_generic_consistency.py:98
↓ 1 callersFunction_get_select_related_field_choices
Get valid field choices for select_related lookups. Based on Django's SQLCompiler.get_related_selections._get_field_choices method.
mypy_django_plugin/transformers/querysets.py:1017
↓ 1 callersFunction_has_compatible_type_vars
Determines whether the provided 'type_info', is a generically parameterized subclass of models.QuerySet[T], with exactly one type variabl
mypy_django_plugin/transformers/managers.py:183
↓ 1 callersFunction_infer_prefetch_queryset_type
Infer the model Instance from `Prefetch(queryset=...)`
mypy_django_plugin/transformers/querysets.py:595
↓ 1 callersFunction_is_lazy_member
(node: TypeInfo, member_name: str)
mypy_django_plugin/transformers/choices.py:64
↓ 1 callersFunction_label_laziness
Check whether a choices type has lazy strings for labels. This is used to determine whether a choices type uses lazy strings or non-lazy str
mypy_django_plugin/transformers/choices.py:80
↓ 1 callersFunction_process_dynamic_method
( method_name: str, method_type: CallableType, *, queryset_info: TypeInfo, base_that_has_m
mypy_django_plugin/transformers/managers.py:120
next →1–100 of 440, ranked by callers