Skip to content

Commit 5a2ed0f

Browse files
committed
Fix documentation for DatabaseJanitor
The DatabaseJanitor now only accepts keyword arguments.
1 parent f56d9c9 commit 5a2ed0f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,11 @@ For this import DatabaseJanitor and use its init and drop methods:
348348
# variable definition
349349
350350
janitor = DatabaseJanitor(
351-
postgresql_proc.user,
352-
postgresql_proc.host,
351+
user=postgresql_proc.user,
352+
host=postgresql_proc.host,
353353
postgresql_proc.port,
354-
"my_test_database",
355-
postgresql_proc.version,
354+
testdb="my_test_database",
355+
version=postgresql_proc.version,
356356
password="secret_password",
357357
)
358358
janitor.init()
@@ -377,11 +377,11 @@ or use it as a context manager:
377377
# variable definition
378378
379379
with DatabaseJanitor(
380-
postgresql_proc.user,
381-
postgresql_proc.host,
382-
postgresql_proc.port,
383-
"my_test_database",
384-
postgresql_proc.version,
380+
user=postgresql_proc.user,
381+
host=postgresql_proc.host,
382+
port=postgresql_proc.port,
383+
dbname="my_test_database",
384+
version=postgresql_proc.version,
385385
password="secret_password",
386386
):
387387
yield psycopg2.connect(

0 commit comments

Comments
 (0)