cleanup; remove unused imports

This commit is contained in:
Sean Breckenridge 2021-04-02 00:17:24 -07:00 committed by karlicoss
parent a11a3af597
commit 5ecd4b4810
39 changed files with 36 additions and 67 deletions

View file

@ -26,7 +26,6 @@ def make_config(cls: Type[C], migration: Callable[[Attrs], Attrs]=lambda x: x) -
F = TypeVar('F')
from contextlib import contextmanager
import inspect
from typing import Iterator
@contextmanager
def override_config(config: F) -> Iterator[F]:

View file

@ -99,7 +99,7 @@ config = make_config(Config)
### tests start
from typing import Iterator, Any
from typing import Iterator
from contextlib import contextmanager as ctx
@ctx
def _reset_config() -> Iterator[Config]:

View file

@ -29,7 +29,6 @@ del ModuleType
def setup_config() -> None:
import sys
import warnings
from typing import Optional
from .preinit import get_mycfg_dir
mycfg_dir = get_mycfg_dir()

View file

@ -36,7 +36,6 @@ def one_table(o: OrgNode) -> Table:
return one(collect(o, lambda n: (x for x in n.body_rich if isinstance(x, Table))))
from typing import Iterator, Dict, Any
class TypedTable(Table):
def __new__(cls, orig: Table) -> 'TypedTable':
tt = super().__new__(TypedTable)

View file

@ -5,7 +5,7 @@ Various pandas helpers and convenience functions
# NOTE: this file is meant to be importable without Pandas installed
from datetime import datetime
from pprint import pformat
from typing import Optional, TYPE_CHECKING, Any, Iterable, Type, List, Dict
from typing import Optional, TYPE_CHECKING, Any, Iterable, Type, Dict
from . import warnings, Res
from .common import LazyLogger, Json, asdict

View file

@ -1,5 +1,5 @@
from functools import lru_cache
from datetime import datetime, tzinfo
from datetime import tzinfo
from typing import Sequence
import pytz # type: ignore

View file

@ -3,7 +3,6 @@ from itertools import chain
from importlib import import_module
import os
import pkgutil
import re
import sys
from typing import List, Iterable, Optional