Skip to content

Commit d48f458

Browse files
author
Greg Leclercq
committed
Reformat with black
1 parent 6830e74 commit d48f458

File tree

3 files changed

+15
-21
lines changed

3 files changed

+15
-21
lines changed

integration_tests/fixtures.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,23 @@
99
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1010
# See the License for the specific language governing permissions and
1111
# limitations under the License.
12-
from __future__ import absolute_import
13-
from __future__ import division
14-
from __future__ import print_function
12+
from __future__ import absolute_import, division, print_function
1513

16-
from contextlib import closing
1714
import os
18-
import requests
1915
import socket
2016
import subprocess
2117
import time
22-
from uuid import uuid4
2318
import xml.etree.ElementTree as ET
19+
from contextlib import closing
20+
from uuid import uuid4
2421

2522
import click
23+
import prestodb.logging
2624
import pytest
27-
25+
import requests
2826
from prestodb.client import PrestoQuery, PrestoRequest
2927
from prestodb.constants import DEFAULT_PORT
3028
from prestodb.exceptions import TimeoutError
31-
import prestodb.logging
3229

3330

3431
logger = prestodb.logging.get_logger(__name__)

integration_tests/test_dbapi.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@
99
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1010
# See the License for the specific language governing permissions and
1111
# limitations under the License.
12-
from __future__ import absolute_import
13-
from __future__ import division
14-
from __future__ import print_function
12+
from __future__ import absolute_import, division, print_function
1513

1614
import fixtures
17-
from fixtures import run_presto
1815
import prestodb
1916
import pytest
20-
17+
from fixtures import run_presto
2118
from prestodb.transaction import IsolationLevel
2219

2320

prestodb/client.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ def __init__(self, id, stats, warnings, info_uri, next_uri, rows, columns=None):
109109

110110
def __repr__(self):
111111
return (
112-
'PrestoStatus('
113-
'id={}, stats={{...}}, warnings={}, info_uri={}, next_uri={}, rows=<count={}>'
114-
')'.format(
112+
"PrestoStatus("
113+
"id={}, stats={{...}}, warnings={}, info_uri={}, next_uri={}, rows=<count={}>"
114+
")".format(
115115
self.id,
116116
len(self.warnings),
117117
self.info_uri,
@@ -413,10 +413,10 @@ def process(self, http_response):
413413
self._next_uri = response.get("nextUri")
414414

415415
return PrestoStatus(
416-
id=response['id'],
417-
stats=response['stats'],
418-
warnings=response.get('warnings', []),
419-
info_uri=response['infoUri'],
416+
id=response["id"],
417+
stats=response["stats"],
418+
warnings=response.get("warnings", []),
419+
info_uri=response["infoUri"],
420420
next_uri=self._next_uri,
421421
rows=response.get("data", []),
422422
columns=response.get("columns"),
@@ -511,7 +511,7 @@ def execute(self):
511511
self.query_id = status.id
512512
self._stats.update({u"queryId": self.query_id})
513513
self._stats.update(status.stats)
514-
self._warnings = getattr(status, 'warnings', [])
514+
self._warnings = getattr(status, "warnings", [])
515515
if status.next_uri is None:
516516
self._finished = True
517517
self._result = PrestoResult(self, status.rows)

0 commit comments

Comments
 (0)