Skip to content

Commit f328c33

Browse files
Silence mypy warning on symbol available after 1.14
1 parent 376db68 commit f328c33

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

django-stubs/core/serializers/xml_serializer.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from typing import IO, Any
2-
from xml.sax.expatreader import ExpatParser
2+
from xml.sax.expatreader import ExpatParser # type: ignore[import-not-found, unused-ignore]
33

44
from django.core.serializers import base
55

django-stubs/db/models/enums.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ChoicesType(EnumType):
3838
@deprecated("ChoicesMeta is deprecated in favor of ChoicesType and will be removed in Django 6.0.")
3939
class ChoicesMeta(ChoicesType): ...
4040

41-
class Choices(enum.Enum, metaclass=ChoicesType): # type: ignore[misc]
41+
class Choices(enum.Enum, metaclass=ChoicesType): # type: ignore[misc, unused-ignore]
4242
_label_: _StrOrPromise
4343
do_not_call_in_templates: Literal[True]
4444

mypy_django_plugin/transformers/choices.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# TODO: [mypy 1.14+] Remove this backport of `TypeInfo.enum_members`.
2222
def _get_enum_members(info: TypeInfo) -> list[str]:
2323
try:
24-
return info.enum_members
24+
return info.enum_members # type: ignore[attr-defined, no-any-return, unused-ignore]
2525
except AttributeError: # mypy < 1.14
2626
pass
2727

0 commit comments

Comments
 (0)