Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 8ca2992

Browse files
committed
Ran black
1 parent 33438b4 commit 8ca2992

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

data_diff/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,19 @@ def diff_tables(
7373
7474
"""
7575
tables = [table1, table2]
76-
override_attrs = {k:v for k,v in dict(
76+
override_attrs = {
77+
k: v
78+
for k, v in dict(
7779
key_column=key_column,
7880
update_column=update_column,
7981
extra_columns=extra_columns,
8082
min_key=min_key,
8183
max_key=max_key,
8284
min_update=min_update,
8385
max_update=max_update,
84-
).items() if v is not None}
86+
).items()
87+
if v is not None
88+
}
8589

8690
segments = [t.new(**override_attrs) for t in tables] if override_attrs else tables
8791

data_diff/diff_tables.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,16 @@ def diff_tables(self, table1: TableSegment, table2: TableSegment) -> DiffResult:
388388
table1_count = self.stats.get("table1_count")
389389
table2_count = self.stats.get("table2_count")
390390
diff_count = self.stats.get("diff_count")
391-
err_message = str(error)[:20] # Truncate possibly sensitive information.
391+
err_message = str(error)[:20] # Truncate possibly sensitive information.
392392
event_json = create_end_event_json(
393-
error is None, runtime, table1.database.name, table2.database.name, table1_count, table2_count, diff_count, err_message
393+
error is None,
394+
runtime,
395+
table1.database.name,
396+
table2.database.name,
397+
table1_count,
398+
table2_count,
399+
diff_count,
400+
err_message,
394401
)
395402
send_event_json(event_json)
396403

tests/test_cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212

1313
def run_datadiff_cli(*args):
1414
try:
15-
stdout = subprocess.check_output([sys.executable, "-m", "data_diff", '--no-tracking'] + list(args), stderr=subprocess.PIPE)
15+
stdout = subprocess.check_output(
16+
[sys.executable, "-m", "data_diff", "--no-tracking"] + list(args), stderr=subprocess.PIPE
17+
)
1618
except subprocess.CalledProcessError as e:
1719
logging.error(e.stderr)
1820
raise

0 commit comments

Comments
 (0)