From 3ae4a30d9c1a31010fea6a4e7c81524ebc1216ae Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Wed, 8 Nov 2023 18:53:50 +0100 Subject: [PATCH] Apply a refurb suggestion that does improve the code [FURB138]: Consider using list comprehension --- pyedflib/edfreader.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyedflib/edfreader.py b/pyedflib/edfreader.py index 6b4cacc..8a98fcb 100644 --- a/pyedflib/edfreader.py +++ b/pyedflib/edfreader.py @@ -171,10 +171,10 @@ def getSignalHeaders(self): ---------- None """ - signalHeader = [] - for chn in np.arange(self.signals_in_file): - signalHeader.append(self.getSignalHeader(chn)) - return signalHeader + return [ + self.getSignalHeader(chn) + for chn in np.arange(self.signals_in_file) + ] def getTechnician(self): """