From d0ea62d2bd55d3d64da5d647f63db57fdace5a19 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Wed, 26 Sep 2018 22:23:24 +0300 Subject: [PATCH] database.py: Use one line for psycopg2 imports --- database.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/database.py b/database.py index a7a7dab..2cbb75c 100644 --- a/database.py +++ b/database.py @@ -2,8 +2,7 @@ from config import DATABASE_NAME from config import DATABASE_USER from config import DATABASE_PASS from config import DATABASE_HOST -import psycopg2 -import psycopg2.extras +import psycopg2, psycopg2.extras def database_connection(): connection = psycopg2.connect("dbname={} user={} password={} host='{}'".format(DATABASE_NAME, DATABASE_USER, DATABASE_PASS, DATABASE_HOST), cursor_factory=psycopg2.extras.DictCursor)