Skip to content

Commit 82f5f68

Browse files
Fix a few typos (#2579)
1 parent 09d24f0 commit 82f5f68

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

mypy_django_plugin/django/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def get_field_lookup_exact_type(
180180
def get_related_target_field(
181181
self, related_model_cls: type[Model], field: "ForeignKey[Any, Any]"
182182
) -> "Optional[Field[Any, Any]]":
183-
# ForeginKey only supports one `to_fields` item (ForeignObject supports many)
183+
# ForeignKey only supports one `to_fields` item (ForeignObject supports many)
184184
assert len(field.to_fields) == 1
185185
to_field_name = field.to_fields[0]
186186
if to_field_name:

tests/assert_type/db/models/test_constraints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from django.db.models.lookups import LessThan
66

77
UniqueConstraint(Lower("name").desc(), "category", name="unique_lower_name_category")
8-
UniqueConstraint(fields=["name"], name="unqiue_name")
8+
UniqueConstraint(fields=["name"], name="unique_name")
99
# There's no overload case for passing both expression and 'fields'
1010
UniqueConstraint( # type: ignore[call-overload]
1111
Lower("name"),

tests/typecheck/contrib/admin/test_options.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
list_max_show_all = 2
5757
list_editable = ("a", "b")
5858
search_fields = ("c", "d")
59-
date_hirearchy = "f"
59+
date_hierarchy = "f"
6060
save_as = False
6161
save_as_continue = True
6262
save_on_top = False

tests/typecheck/test_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from django.db import models
1515
class MyUser(models.Model):
1616
pass
17-
- case: request_object_user_can_be_descriminated
17+
- case: request_object_user_can_be_discriminated
1818
main: |
1919
from django.http.request import HttpRequest
2020
request = HttpRequest()

tests/typecheck/test_settings.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@
5151
from django.conf import settings
5252
if hasattr(settings, 'AUTH_USER_MODEL') and settings.AUTH_USER_MODEL:
5353
reveal_type(settings.AUTH_USER_MODEL)
54-
if hasattr(settings, 'NON_EXISTANT_SETTING') and settings.NON_EXISTANT_SETTING:
55-
reveal_type(settings.NON_EXISTANT_SETTING)
54+
if hasattr(settings, 'NON_EXISTENT_SETTING') and settings.NON_EXISTENT_SETTING:
55+
reveal_type(settings.NON_EXISTENT_SETTING)
5656
out: |
5757
main:3: note: Revealed type is "builtins.str"
58-
main:4: error: 'Settings' object has no attribute 'NON_EXISTANT_SETTING' [misc]
59-
main:5: error: 'Settings' object has no attribute 'NON_EXISTANT_SETTING' [misc]
58+
main:4: error: 'Settings' object has no attribute 'NON_EXISTENT_SETTING' [misc]
59+
main:5: error: 'Settings' object has no attribute 'NON_EXISTENT_SETTING' [misc]
6060
main:5: note: Revealed type is "Any"
6161
6262

0 commit comments

Comments
 (0)