From afffe213e3312e8df21b9e05f2e1024e9580d67a Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Mon, 1 Jul 2024 22:31:15 -0700 Subject: [PATCH] pylint --- mfbatch/commands.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mfbatch/commands.py b/mfbatch/commands.py index 90eb738..67ae64f 100644 --- a/mfbatch/commands.py +++ b/mfbatch/commands.py @@ -162,8 +162,8 @@ they appear in the batchfile. def _handle_command(self, line, lineno): args = shlex.split(line) - actions = [member for member in dir(self) - if not (member.startswith('_') or member == 'eval') ] + actions = [m_name for m_name in dir(self) + if not (m_name.startswith('_') or m_name == 'eval') ] if args[0] in actions: try: @@ -202,13 +202,11 @@ they appear in the batchfile. else: sys.stdout.write(f"\nFile: \033[1m{line}\033[0m\n") - for key in self.env.metadatums.keys(): + for key, value in self.env.metadatums.items(): if key.startswith('_'): continue - value = self.env.metadatums[key] - LINE_LEN = int(shutil.get_terminal_size()[0]) - 32 value_lines = [value[i:i+LINE_LEN] for i in range(0, len(value), LINE_LEN)]