mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-06 12:14:28 +08:00
Fix typecheck tests ci (#165)
* remove mention of mypy newsemanal to prepare for 0.730 * make typecheck_tests CI really work * fix lints * fix intentional error * merge stderr in stdout to preserve order Co-authored-by: Daniel Hahler <github@thequod.de>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from collections import OrderedDict
|
||||
from typing import Type, cast
|
||||
from typing import Type
|
||||
|
||||
from django.db.models.base import Model
|
||||
from django.db.models.fields import DateField, DateTimeField
|
||||
@@ -7,7 +7,6 @@ from django.db.models.fields.related import ForeignKey
|
||||
from django.db.models.fields.reverse_related import (
|
||||
ManyToManyRel, ManyToOneRel, OneToOneRel,
|
||||
)
|
||||
from mypy.newsemanal.semanal import NewSemanticAnalyzer
|
||||
from mypy.nodes import (
|
||||
ARG_STAR2, MDEF, Argument, SymbolTableNode, TypeInfo, Var,
|
||||
)
|
||||
@@ -23,7 +22,7 @@ from mypy_django_plugin.transformers.fields import get_field_descriptor_types
|
||||
|
||||
class ModelClassInitializer:
|
||||
def __init__(self, ctx: ClassDefContext, django_context: DjangoContext):
|
||||
self.api = cast(NewSemanticAnalyzer, ctx.api)
|
||||
self.api = ctx.api
|
||||
self.model_classdef = ctx.cls
|
||||
self.django_context = django_context
|
||||
self.ctx = ctx
|
||||
|
||||
Reference in New Issue
Block a user