Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mypy to 1.15.0 #2502

Merged
merged 2 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions django-stubs/core/serializers/xml_serializer.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import IO, Any
from xml.sax.expatreader import ExpatParser as _ExpatParser # type: ignore[import-not-found]
from xml.sax.expatreader import ExpatParser

from django.core.serializers import base

Expand Down Expand Up @@ -31,7 +31,7 @@ class Deserializer(base.Deserializer):

def getInnerText(node: Any) -> str: ...

class DefusedExpatParser(_ExpatParser):
class DefusedExpatParser(ExpatParser):
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def start_doctype_decl(self, name: Any, sysid: Any, pubid: Any, has_internal_subset: Any) -> None: ...
def entity_decl(
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ Django==5.1.5; python_version >= '3.10'
-e .[redis,compatible-mypy,oracle]

# Overrides:
mypy==1.14.1
mypy==1.15.0
pyright==1.1.393
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def find_stub_files(name: str) -> list[str]:

# Keep compatible-mypy major.minor version pinned to what we use in CI (requirements.txt)
extras_require = {
"compatible-mypy": ["mypy>=1.12,<1.15"],
"compatible-mypy": ["mypy>=1.12,<1.16"],
"redis": ["redis"],
"oracle": ["oracledb"],
}
Expand Down
2 changes: 1 addition & 1 deletion tests/typecheck/managers/querysets/test_from_queryset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@
main:12: note: Revealed type is "Type[django.db.models.manager.Manager[django.db.models.base.Model]]"
main:12: error: Argument 1 to "from_queryset" of "BaseManager" has incompatible type "<typing special form>"; expected "Type[QuerySet[Model, Model]]" [arg-type]
main:17: note: Revealed type is "Type[django.db.models.manager.Manager[django.db.models.base.Model]]"
main:17: error: Argument 1 to "from_queryset" of "BaseManager" has incompatible type "Type[NonQSGeneric[Any]]"; expected "Type[QuerySet[Model, Model]]" [arg-type]
main:17: error: Argument 1 to "from_queryset" of "BaseManager" has incompatible type "Type[NonQSGeneric[int]]"; expected "Type[QuerySet[Model, Model]]" [arg-type]

- case: test_reverse_manager_with_foreign_key
main: |
Expand Down
Loading