Skip to content

Commit

Permalink
Change DBInfo return type
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolepng committed Jun 23, 2023
1 parent 2f694a5 commit 2ebd6f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions piicatcher/dbinfo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from abc import ABC, abstractmethod
from typing import List, Type
from typing import List

from dbcat.catalog import CatSchema, CatTable

Expand Down Expand Up @@ -146,7 +146,7 @@ class Athena(Postgres):
pass


def get_dbinfo(source_type: str, *args, **kwargs) -> Type[DbInfo]:
def get_dbinfo(source_type: str, *args, **kwargs) -> DbInfo:
if source_type == "sqlite":
return Sqlite(*args, **kwargs)
elif source_type == "mysql":
Expand Down
6 changes: 3 additions & 3 deletions piicatcher/generators.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import datetime
import logging
import re
from typing import Generator, List, Optional, Tuple, Type
from typing import Generator, List, Optional, Tuple

from dbcat.catalog import Catalog, CatColumn, CatSchema, CatSource, CatTable
from dbcat.generators import NoMatchesError, table_generator
Expand Down Expand Up @@ -44,7 +44,7 @@ def column_generator(
def _get_table_count(
schema: CatSchema,
table: CatTable,
dbinfo: Type[DbInfo],
dbinfo: DbInfo,
connection,
source=CatSource,
) -> int:
Expand All @@ -61,7 +61,7 @@ def _get_query(
schema: CatSchema,
table: CatTable,
column_list: List[CatColumn],
dbinfo: Type[DbInfo],
dbinfo: DbInfo,
connection,
source: CatSource,
sample_size: int = SMALL_TABLE_MAX,
Expand Down

0 comments on commit 2ebd6f5

Please sign in to comment.