diff --git a/ydb/driver.py b/ydb/driver.py index fa116fe3..49bd223c 100644 --- a/ydb/driver.py +++ b/ydb/driver.py @@ -3,7 +3,6 @@ import logging import os from typing import Any # noqa -from typing import Optional from . import credentials as credentials_impl, table, scheme, pool from . import tracing @@ -144,7 +143,7 @@ def __init__( """ self.endpoint = endpoint - self.database = self._maybe_add_slash(database) + self.database = database self.ca_cert = ca_cert self.channel_options = channel_options self.secure_channel = _utilities.is_secure_protocol(endpoint) @@ -170,7 +169,7 @@ def __init__( self.compression = compression def set_database(self, database): - self.database = self._maybe_add_slash(database) + self.database = database return self @classmethod @@ -207,15 +206,6 @@ def _update_attrs_by_kwargs(self, **kwargs): ) setattr(self, key, value) - def _maybe_add_slash(self, database: Optional[str]) -> Optional[str]: - if not database: - return database - - if database.startswith("/"): - return database - - return f"/{database}" - ConnectionParams = DriverConfig