Skip to content

Commit 59a5a90

Browse files
committed
linter
1 parent 5c22ec4 commit 59a5a90

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

sqlserver/datadog_checks/sqlserver/schemas.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -375,31 +375,31 @@ def _populate_with_columns_data(self, table_ids, name_to_id, id_to_table_data, s
375375
return len(data)
376376

377377
@tracked_method(agent_check_getter=agent_check_getter)
378-
def _populate_with_partitions_data(self, table_ids, id_to_table_data, cursor):
378+
def _populate_with_partitions_data(self, table_ids, table_id_to_table_data, cursor):
379379
rows = execute_query(PARTITIONS_QUERY.format(table_ids), cursor)
380380
for row in rows:
381-
id = row.pop("id", None)
382-
if id is not None:
383-
id_str = str(id)
384-
if id_str in id_to_table_data:
385-
id_to_table_data[id_str]["partitions"] = row
381+
table_id = row.pop("id", None)
382+
if table_id is not None:
383+
table_id_str = str(table_id)
384+
if table_id_str in table_id_to_table_data:
385+
table_id_to_table_data[table_id_str]["partitions"] = row
386386
else:
387-
self._log.debug("Partition found for an unkown table with the object_id: {}".format(id_str))
387+
self._log.debug("Partition found for an unkown table with the object_id: {}".format(table_id_str))
388388
else:
389389
self._log.debug("Return rows of [{}] query should have id column".format(PARTITIONS_QUERY))
390390

391391
@tracked_method(agent_check_getter=agent_check_getter)
392-
def _populate_with_index_data(self, table_ids, id_to_table_data, cursor):
392+
def _populate_with_index_data(self, table_ids, table_id_to_table_data, cursor):
393393
rows = execute_query(INDEX_QUERY.format(table_ids), cursor)
394394
for row in rows:
395-
id = row.pop("id", None)
396-
if id is not None:
397-
id_str = str(id)
398-
if id_str in id_to_table_data:
399-
id_to_table_data[id_str].setdefault("indexes", [])
400-
id_to_table_data[id_str]["indexes"].append(row)
395+
table_id = row.pop("id", None)
396+
if table_id is not None:
397+
table_id_str = str(table_id)
398+
if table_id_str in table_id_to_table_data:
399+
table_id_to_table_data[table_id_str].setdefault("indexes", [])
400+
table_id_to_table_data[table_id_str]["indexes"].append(row)
401401
else:
402-
self._log.debug("Index found for an unkown table with the object_id: {}".format(id_str))
402+
self._log.debug("Index found for an unkown table with the object_id: {}".format(table_id_str))
403403
else:
404404
self._log.debug("Return rows of [{}] query should have id column".format(INDEX_QUERY))
405405

0 commit comments

Comments
 (0)