mirror of
https://github.com/tiqi-group/pydase_service_base.git
synced 2025-06-08 21:40:41 +02:00
fix: types for sessions
This commit is contained in:
parent
9b2c26dc42
commit
bdeb62e595
@ -1,7 +1,14 @@
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .influxdb_session import InfluxDBSession # type: ignore
|
||||
from .influxdbv1_session import InfluxDBv1Session # type: ignore
|
||||
from .postgres_session import PostgresDatabaseSession # type: ignore
|
||||
else:
|
||||
|
||||
class OptionalDependencyError(Exception):
|
||||
"""Exception raised when an optional dependency is not installed."""
|
||||
|
||||
|
||||
try:
|
||||
import influxdb_client # type: ignore # noqa
|
||||
|
||||
@ -15,9 +22,8 @@ except ImportError:
|
||||
"Please refer to https://gitlab.phys.ethz.ch/tiqi-projects/qchub/icon-services/pydase_service_base."
|
||||
)
|
||||
|
||||
|
||||
try:
|
||||
import influxdb # noqa
|
||||
import influxdb # type: ignore # noqa
|
||||
|
||||
from .influxdbv1_session import InfluxDBv1Session # type: ignore
|
||||
except ImportError:
|
||||
@ -29,7 +35,6 @@ except ImportError:
|
||||
"Please refer to https://gitlab.phys.ethz.ch/tiqi-projects/qchub/icon-services/pydase_service_base."
|
||||
)
|
||||
|
||||
|
||||
try:
|
||||
import sqlmodel # noqa
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user