chore: minor clean up / formatting (#233)

to get familiarize with the project
This commit is contained in:
Xupeng (Tony) Tong
2022-12-02 02:50:36 +08:00
committed by GitHub
parent 473943643e
commit bb4bf9d6d0
18 changed files with 51 additions and 32 deletions

View File

@@ -1,4 +1,6 @@
"""SQLAlchemy wrapper around a database."""
from __future__ import annotations
from typing import Any, Iterable, List, Optional
from sqlalchemy import create_engine, inspect
@@ -37,7 +39,7 @@ class SQLDatabase:
)
@classmethod
def from_uri(cls, database_uri: str, **kwargs: Any) -> "SQLDatabase":
def from_uri(cls, database_uri: str, **kwargs: Any) -> SQLDatabase:
"""Construct a SQLAlchemy engine from URI."""
return cls(create_engine(database_uri), **kwargs)