Commit 68e8b0ab authored by Grant, Josh's avatar Grant, Josh
Browse files

use union for type and optional in the get_mixin_for_type

parent c43695e9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
"""
This is a MultiDatabase class using multiple Database Mixins
"""
from typing import Type, Callable, Optional
from typing import Type, Callable, Optional, Union
from uuid import uuid4
from concurrent.futures import ThreadPoolExecutor

@@ -36,7 +36,7 @@ class MultiDatabase:
    @staticmethod
    def _get_mixin_for_type(
        db_type: str,
    ) -> Type[PostgresMixin, MSSQLMixin, InfluxMixin, None]:
    ) -> Optional[Type[Union[PostgresMixin, MSSQLMixin, InfluxMixin]]]:
        db_type = db_type.lower()
        if db_type.startswith("postgres") or db_type.startswith("pg"):
            return PostgresMixin