Fix RUF015 (next() instead of list comprehensions[0])

https://docs.astral.sh/ruff/rules/-iterable-allocation-for-first-element/
This commit is contained in:
Andrej730
2025-06-16 12:29:41 +05:00
parent b486b32c8d
commit a12bb343ca
29 changed files with 64 additions and 61 deletions
+2 -1
View File
@@ -180,7 +180,8 @@ class Writer:
continue
if not headers:
headers = list(data[list(data.keys())[0]].keys())
key = next(iter(data.keys()))
headers = list(data[key].keys())
rows = []
for row in data.values():