Skip to content

Commit 4f1d0cd

Browse files
committed
Lint
1 parent cc42196 commit 4f1d0cd

File tree

1 file changed

+45
-16
lines changed

1 file changed

+45
-16
lines changed

mypy/exportjson.py

Lines changed: 45 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,52 @@
1717
import json
1818
from typing import Any, TypeAlias as _TypeAlias
1919

20-
from mypy.types import (
21-
Type, get_proper_type, Instance, AnyType, UnionType, TupleType, CallableType,
22-
Overloaded, TypeVarType, TypeAliasType, LiteralType, NoneType, TypeType,
23-
UninhabitedType, UnpackType, TypeVarTupleType, ParamSpecType, Parameters,
24-
TypedDictType
25-
)
20+
from librt.internal import Buffer
21+
2622
from mypy.nodes import (
27-
MypyFile, SymbolTable, SymbolTableNode, node_kinds, SymbolNode, FuncDef, TypeInfo,
28-
TypeAlias, TypeVarExpr, Var, OverloadedFuncDef, get_flags, FUNCDEF_FLAGS,
29-
DataclassTransformSpec, FUNCBASE_FLAGS, OverloadPart, Decorator, VAR_FLAGS,
30-
ParamSpecExpr, TypeVarTupleExpr, ClassDef
23+
FUNCBASE_FLAGS,
24+
FUNCDEF_FLAGS,
25+
VAR_FLAGS,
26+
ClassDef,
27+
DataclassTransformSpec,
28+
Decorator,
29+
FuncDef,
30+
MypyFile,
31+
OverloadedFuncDef,
32+
OverloadPart,
33+
ParamSpecExpr,
34+
SymbolNode,
35+
SymbolTable,
36+
SymbolTableNode,
37+
TypeAlias,
38+
TypeInfo,
39+
TypeVarExpr,
40+
TypeVarTupleExpr,
41+
Var,
42+
get_flags,
43+
node_kinds,
44+
)
45+
from mypy.types import (
46+
AnyType,
47+
CallableType,
48+
Instance,
49+
LiteralType,
50+
NoneType,
51+
Overloaded,
52+
Parameters,
53+
ParamSpecType,
54+
TupleType,
55+
Type,
56+
TypeAliasType,
57+
TypedDictType,
58+
TypeType,
59+
TypeVarTupleType,
60+
TypeVarType,
61+
UninhabitedType,
62+
UnionType,
63+
UnpackType,
64+
get_proper_type,
3165
)
32-
from librt.internal import Buffer
3366

3467
JsonDict: _TypeAlias = dict[str, Any]
3568

@@ -357,11 +390,7 @@ def convert_tuple_type(self: TupleType) -> JsonDict:
357390

358391

359392
def convert_literal_type(self: LiteralType) -> JsonDict:
360-
return {
361-
".class": "LiteralType",
362-
"value": self.value,
363-
"fallback": convert_type(self.fallback),
364-
}
393+
return {".class": "LiteralType", "value": self.value, "fallback": convert_type(self.fallback)}
365394

366395

367396
def convert_type_var_type(self: TypeVarType) -> JsonDict:

0 commit comments

Comments
 (0)