Skip to content

Commit

Permalink
remove a bunch of unused imports
Browse files Browse the repository at this point in the history
Summary: VSCode warns about these now, so I felt like cleaning them up.

Reviewed By: DinoV

Differential Revision: D31348979

fbshipit-source-id: e2f7e19
  • Loading branch information
Carl Meyer authored and facebook-github-bot committed Oct 1, 2021
1 parent 38f56fc commit 6862bbd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 43 deletions.
31 changes: 4 additions & 27 deletions Lib/compiler/static/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
Constant,
DictComp,
FunctionDef,
GeneratorExp,
ListComp,
Module,
Name,
UnaryOp,
Expand All @@ -28,51 +26,32 @@
from contextlib import contextmanager
from typing import (
Callable as typingCallable,
Collection,
Dict,
Generator,
Generic,
Iterable,
List,
Mapping,
NoReturn,
Optional,
Sequence,
Set,
Tuple,
Type,
TypeVar,
Union,
cast,
)

from __static__ import chkdict

from .. import consts, symbols, opcode_static
from ..consts import SC_LOCAL, SC_GLOBAL_EXPLICIT, SC_GLOBAL_IMPLICIT
from ..opcodebase import Opcode
from ..optimizer import AstOptimizer
from ..pyassem import Block, PyFlowGraph, PyFlowGraphCinder, IndexedSet
from ..pycodegen import (
CodeGenerator,
CinderCodeGenerator,
compile,
FOR_LOOP,
FuncOrLambda,
CompNode,
)
from ..strict import StrictCodeGenerator, FIXED_MODULES, enable_strict_features
from ..symbols import Scope, SymbolVisitor, ModuleScope, ClassScope
from ..unparse import to_expr
from .declaration_visitor import GenericVisitor, DeclarationVisitor
from ..symbols import Scope, SymbolVisitor, ClassScope
from .declaration_visitor import DeclarationVisitor
from .effects import NarrowingEffect
from .errors import ErrorSink
from .module_table import ModuleTable, ModuleFlag
from .symbol_table import SymbolTable
from .type_binder import BindingScope, TypeBinder
from .type_binder import TypeBinder
from .types import (
ASYNC_CACHED_PROPERTY_IMPL_PREFIX,
AsyncCachedPropertyDecorator,
AsyncCachedPropertyMethod,
AwaitableType,
CACHED_PROPERTY_IMPL_PREFIX,
Expand All @@ -98,14 +77,12 @@
TypeDescr,
Value,
_TMP_VAR_PREFIX,
CachedPropertyDecorator,
CachedPropertyMethod,
ContextDecoratedMethod,
)


try:
import xxclassloader # pyre-ignore[21]: unknown module
# pyre-ignore[21]: unknown module
from xxclassloader import spamobj
except ImportError:
spamobj = None
Expand Down
4 changes: 0 additions & 4 deletions Lib/compiler/static/symbol_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
BUILTIN_GENERICS,
BYTES_TYPE,
BoxFunction,
BuiltinFunction,
BuiltinFunctionType,
CBOOL_TYPE,
CHAR_TYPE,
CHECKED_DICT_TYPE,
Expand Down Expand Up @@ -75,7 +73,6 @@
PROTOCOL_TYPE,
PROPERTY_TYPE,
ProdAssertFunction,
ResolvedTypeRef,
RevealTypeFunction,
SET_EXACT_TYPE,
SPAM_OBJ,
Expand All @@ -95,7 +92,6 @@
VECTOR_TYPE,
Value,
XX_GENERIC_TYPE,
parse_typed_signature,
reflect_builtin_function,
CACHED_PROPERTY_TYPE,
)
Expand Down
12 changes: 0 additions & 12 deletions Lib/compiler/static/type_binder.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,23 @@
And,
AnnAssign,
Assign,
AsyncFor,
AsyncFunctionDef,
AsyncWith,
Attribute,
AugAssign,
Await,
BinOp,
BoolOp,
Bytes,
Call,
ClassDef,
Compare,
Constant,
DictComp,
Ellipsis,
For,
FormattedValue,
FunctionDef,
GeneratorExp,
If,
IfExp,
Import,
ImportFrom,
Index,
Is,
Expand All @@ -39,17 +34,14 @@
Module,
Name,
NameConstant,
Num,
Return,
SetComp,
Slice,
Starred,
Str,
Subscript,
Try,
UnaryOp,
While,
With,
Yield,
YieldFrom,
expr,
Expand All @@ -72,7 +64,6 @@
from .effects import NarrowingEffect, NO_EFFECT
from .module_table import ModuleTable, ModuleFlag
from .types import (
AWAITABLE_TYPE,
AwaitableType,
BOOL_TYPE,
CHECKED_DICT_TYPE,
Expand Down Expand Up @@ -101,14 +92,11 @@
STR_EXACT_TYPE,
Slot,
TType,
TYPE_TYPE,
TUPLE_EXACT_TYPE,
UNION_TYPE,
UnionInstance,
Value,
OptionalType,
OptionalInstance,
ClassMethodDecorator,
TransparentDecoratedMethod,
)

Expand Down

0 comments on commit 6862bbd

Please sign in to comment.