style(mypy): Spit-and-polish pass (#10001)

Co-authored-by: John Bodley <john.bodley@airbnb.com>
This commit is contained in:
John Bodley
2020-06-07 08:53:46 -07:00
committed by GitHub
parent 656cdfb867
commit 91517a56a3
56 changed files with 243 additions and 207 deletions

View File

@@ -27,8 +27,8 @@ logger = logging.getLogger(__name__)
def import_datasource(
session: Session,
i_datasource: Model,
lookup_database: Callable,
lookup_datasource: Callable,
lookup_database: Callable[[Model], Model],
lookup_datasource: Callable[[Model], Model],
import_time: Optional[int] = None,
) -> int:
"""Imports the datasource from the object to the database.
@@ -82,7 +82,9 @@ def import_datasource(
return datasource.id
def import_simple_obj(session: Session, i_obj: Model, lookup_obj: Callable) -> Model:
def import_simple_obj(
session: Session, i_obj: Model, lookup_obj: Callable[[Model], Model]
) -> Model:
make_transient(i_obj)
i_obj.id = None
i_obj.table = None