Skip to content

Commit 35e93b0

Browse files
kushalbakshiclaude
andcommitted
style: apply ruff-format to dbname changes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent bdbec08 commit 35e93b0

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

src/datajoint/connection.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,7 @@ def connect(self) -> None:
249249
"To require SSL, set use_tls=True explicitly.",
250250
ssl_error,
251251
)
252-
self._conn = self.adapter.connect(
253-
**self._build_connect_kwargs(use_tls=False)
254-
)
252+
self._conn = self.adapter.connect(**self._build_connect_kwargs(use_tls=False))
255253
else:
256254
raise
257255
self._is_closed = False # Mark as connected after successful connection

src/datajoint/settings.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,7 @@ class DatabaseSettings(BaseSettings):
199199
dbname: str | None = Field(
200200
default=None,
201201
validation_alias="DJ_DBNAME",
202-
description="Database name for PostgreSQL connections. "
203-
"Defaults to 'postgres' if not set.",
202+
description="Database name for PostgreSQL connections. Defaults to 'postgres' if not set.",
204203
)
205204
reconnect: bool = True
206205
use_tls: bool | None = Field(default=None, validation_alias="DJ_USE_TLS")

tests/unit/test_settings.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -775,9 +775,7 @@ def test_dbname_from_config_file(self, tmp_path, monkeypatch):
775775
from datajoint.settings import Config
776776

777777
config_file = tmp_path / "test_config.json"
778-
config_file.write_text(json.dumps({
779-
"database": {"dbname": "custom_db", "host": "localhost"}
780-
}))
778+
config_file.write_text(json.dumps({"database": {"dbname": "custom_db", "host": "localhost"}}))
781779

782780
monkeypatch.delenv("DJ_DBNAME", raising=False)
783781
monkeypatch.delenv("DJ_HOST", raising=False)

0 commit comments

Comments
 (0)