Skip to content

Commit 940ae6b

Browse files
committed
Ran black
1 parent 57cb682 commit 940ae6b

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

data_diff/databases/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,9 @@ def query_table_schema(self, path: DbPath) -> Dict[str, tuple]:
187187
assert len(d) == len(rows)
188188
return d
189189

190-
def _process_table_schema(self, path: DbPath, raw_schema: Dict[str, tuple], filter_columns: Sequence[str], where: str = None):
190+
def _process_table_schema(
191+
self, path: DbPath, raw_schema: Dict[str, tuple], filter_columns: Sequence[str], where: str = None
192+
):
191193
accept = {i.lower() for i in filter_columns}
192194

193195
col_dict = {row[0]: self._parse_type(path, *row) for name, row in raw_schema.items() if name.lower() in accept}

data_diff/databases/database_types.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ def query_table_schema(self, path: DbPath) -> Dict[str, tuple]:
177177
...
178178

179179
@abstractmethod
180-
def _process_table_schema(self, path: DbPath, raw_schema: Dict[str, tuple], filter_columns: Sequence[str], where: str = None):
180+
def _process_table_schema(
181+
self, path: DbPath, raw_schema: Dict[str, tuple], filter_columns: Sequence[str], where: str = None
182+
):
181183
"""Process the result of query_table_schema().
182184
183185
Done in a separate step, to minimize the amount of processed columns.

data_diff/databases/databricks.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ def query_table_schema(self, path: DbPath) -> Dict[str, tuple]:
8383
assert len(d) == len(rows)
8484
return d
8585

86-
def _process_table_schema(self, path: DbPath, raw_schema: Dict[str, tuple], filter_columns: Sequence[str], where: str = None):
86+
def _process_table_schema(
87+
self, path: DbPath, raw_schema: Dict[str, tuple], filter_columns: Sequence[str], where: str = None
88+
):
8789
accept = {i.lower() for i in filter_columns}
8890
rows = [row for name, row in raw_schema.items() if name.lower() in accept]
8991

tests/test_diff_tables.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,13 +444,13 @@ def test_string_keys(self):
444444
self.assertRaises(ValueError, list, differ.diff_tables(self.a, self.b))
445445

446446
def test_where_sampling(self):
447-
a = self.a.replace(where='1=1')
447+
a = self.a.replace(where="1=1")
448448

449449
differ = TableDiffer()
450450
diff = list(differ.diff_tables(a, self.b))
451451
self.assertEqual(diff, [("-", (str(self.new_uuid), "This one is different"))])
452452

453-
a_empty = self.a.replace(where='1=0')
453+
a_empty = self.a.replace(where="1=0")
454454
self.assertRaises(ValueError, list, differ.diff_tables(a_empty, self.b))
455455

456456

0 commit comments

Comments
 (0)