mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-06 12:14:28 +08:00
Bump isort, use --diff (#164)
* dev-requirements: bump isort: 4.3.4 => 4.3.21 * isort: use --diff * known_first_party = mypy_django_plugin * Run isort
This commit is contained in:
committed by
Maxim Kurnikov
parent
a85dbff793
commit
afcd0d9293
@@ -30,7 +30,7 @@ jobs:
|
||||
|
||||
- name: Lint plugin code with isort
|
||||
python: 3.7
|
||||
script: 'isort --check'
|
||||
script: 'isort --check --diff'
|
||||
|
||||
before_install: |
|
||||
sudo apt update
|
||||
|
||||
@@ -2,5 +2,5 @@ black
|
||||
pytest-mypy-plugins==1.0.3
|
||||
psycopg2
|
||||
flake8
|
||||
isort==4.3.4
|
||||
isort==4.3.21
|
||||
-e .
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
import os
|
||||
from collections import defaultdict
|
||||
from contextlib import contextmanager
|
||||
from typing import Dict, Iterator, Optional, Set, TYPE_CHECKING, Tuple, Type, Union
|
||||
from typing import (
|
||||
TYPE_CHECKING, Dict, Iterator, Optional, Set, Tuple, Type, Union,
|
||||
)
|
||||
|
||||
from django.core.exceptions import FieldError
|
||||
from django.db.models.base import Model
|
||||
from django.db.models.fields import AutoField, CharField, Field
|
||||
from django.db.models.fields.related import ForeignKey, RelatedField
|
||||
from django.db.models.fields.reverse_related import ForeignObjectRel
|
||||
from django.db.models.sql.query import Query
|
||||
from django.utils.functional import cached_property
|
||||
from mypy.checker import TypeChecker
|
||||
from mypy.types import AnyType, Instance, Type as MypyType, TypeOfAny
|
||||
from mypy.types import AnyType, Instance
|
||||
from mypy.types import Type as MypyType
|
||||
from mypy.types import TypeOfAny
|
||||
|
||||
from django.db.models.fields import AutoField, CharField, Field
|
||||
from mypy_django_plugin.lib import helpers
|
||||
|
||||
try:
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
from collections import OrderedDict
|
||||
from typing import Any, Dict, List, Optional, Set, TYPE_CHECKING, Union, cast
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set, Union, cast
|
||||
|
||||
from mypy import checker
|
||||
from mypy.checker import TypeChecker
|
||||
from mypy.mro import calculate_mro
|
||||
from mypy.nodes import (Block, ClassDef, Expression, GDEF, MDEF, MemberExpr, MypyFile, NameExpr, StrExpr, SymbolNode,
|
||||
SymbolTable, SymbolTableNode, TypeInfo, Var)
|
||||
from mypy.nodes import (
|
||||
GDEF, MDEF, Block, ClassDef, Expression, MemberExpr, MypyFile, NameExpr, StrExpr, SymbolNode, SymbolTable,
|
||||
SymbolTableNode, TypeInfo, Var,
|
||||
)
|
||||
from mypy.plugin import (
|
||||
AttributeContext, CheckerPluginInterface, FunctionContext, MethodContext,
|
||||
)
|
||||
from mypy.types import AnyType, Instance, NoneTyp, TupleType, Type as MypyType, TypeOfAny, TypedDictType, UnionType
|
||||
from mypy.types import AnyType, Instance, NoneTyp, TupleType
|
||||
from mypy.types import Type as MypyType
|
||||
from mypy.types import TypedDictType, TypeOfAny, UnionType
|
||||
|
||||
from mypy_django_plugin.lib import fullnames
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@ from django.db.models.base import Model
|
||||
from django.db.models.fields.related import RelatedField
|
||||
from mypy.nodes import Expression, NameExpr
|
||||
from mypy.plugin import FunctionContext, MethodContext
|
||||
from mypy.types import AnyType, Instance, Type as MypyType, TypeOfAny
|
||||
from mypy.types import AnyType, Instance
|
||||
from mypy.types import Type as MypyType
|
||||
from mypy.types import TypeOfAny
|
||||
|
||||
from mypy_django_plugin.django.context import DjangoContext
|
||||
from mypy_django_plugin.lib import fullnames, helpers
|
||||
|
||||
Reference in New Issue
Block a user