mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-14 19:34:34 +00:00
Fix RUF015 (next() instead of list comprehensions[0])
https://docs.astral.sh/ruff/rules/-iterable-allocation-for-first-element/
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user