Skip to content

Commit 3750f95

Browse files
committed
fix checkstyle
1 parent 7b5c3d1 commit 3750f95

2 files changed

Lines changed: 7 additions & 15 deletions

File tree

ingestion/src/metadata/ingestion/source/database/databricks/metadata.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,7 @@ def get_columns(self, connection, table_name, schema=None, **kw):
210210
try:
211211
coltype = _type_map[col_type]
212212
except KeyError:
213-
util.warn(
214-
f"Did not recognize type '{col_type}' of column '{col_name}'"
215-
)
213+
util.warn(f"Did not recognize type '{col_type}' of column '{col_name}'")
216214
coltype = types.NullType
217215

218216
col_info = {

ingestion/tests/unit/topology/database/test_databricks_get_columns.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ def test_known_whitelisted_markers_still_break(self, mock_rows):
118118

119119
result = self._run(mock_rows)
120120

121-
assert [col["name"] for col in result] == ["id"], (
122-
f"marker {marker!r} should break the loop"
123-
)
121+
assert [col["name"] for col in result] == [
122+
"id"
123+
], f"marker {marker!r} should break the loop"
124124

125125
def test_detailed_info_metadata_rows_are_not_treated_as_columns(self, mock_rows):
126126
"""Post-break, rows like ``Name``, ``Catalog``, ``Location`` inside
@@ -139,9 +139,7 @@ def test_detailed_info_metadata_rows_are_not_treated_as_columns(self, mock_rows)
139139

140140
assert [col["name"] for col in result] == ["id"]
141141

142-
def test_ordinal_positions_are_contiguous_when_loop_breaks_early(
143-
self, mock_rows
144-
):
142+
def test_ordinal_positions_are_contiguous_when_loop_breaks_early(self, mock_rows):
145143
"""Ordinal positions stay contiguous and match the column order in
146144
Databricks when the loop breaks at a section marker."""
147145
mock_rows.return_value = [
@@ -156,9 +154,7 @@ def test_ordinal_positions_are_contiguous_when_loop_breaks_early(
156154

157155
assert [col["ordinal_position"] for col in result] == [0, 1, 2]
158156

159-
def test_ordinal_positions_contiguous_when_a_column_is_skipped(
160-
self, mock_rows
161-
):
157+
def test_ordinal_positions_contiguous_when_a_column_is_skipped(self, mock_rows):
162158
"""If a row fails per-column processing (e.g. unparseable col_type),
163159
surviving columns keep contiguous ordinal positions — no gaps."""
164160
mock_rows.return_value = [
@@ -173,9 +169,7 @@ def test_ordinal_positions_contiguous_when_a_column_is_skipped(
173169
assert [col["name"] for col in result] == ["good1", "good2", "good3"]
174170
assert [col["ordinal_position"] for col in result] == [0, 1, 2]
175171

176-
def test_unexpected_exception_in_row_does_not_drop_other_columns(
177-
self, mock_rows
178-
):
172+
def test_unexpected_exception_in_row_does_not_drop_other_columns(self, mock_rows):
179173
"""Broad per-row try/except ensures one bad column doesn't lose the
180174
rest of the table's columns via the outer sql_column_handler catch."""
181175
mock_rows.return_value = [

0 commit comments

Comments
 (0)