From 3392a2b79ab874a157aaa966c337dd07fefefda3 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Thu, 8 Dec 2016 13:30:40 -1000 Subject: [PATCH] Fix Python formatting to keep flake8 happy. Python coding style is verified by the lib/cretonne/meta/check.sh script which is not run as part of test-all.sh. cc @dinfuehr --- lib/cretonne/meta/gen_instr.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/lib/cretonne/meta/gen_instr.py b/lib/cretonne/meta/gen_instr.py index e0055bcf98..ac4650bc96 100644 --- a/lib/cretonne/meta/gen_instr.py +++ b/lib/cretonne/meta/gen_instr.py @@ -273,9 +273,18 @@ def gen_opcodes(groups, fmt): with fmt.indented('impl Opcode {', '}'): attrs = [ - { 'name': 'is_branch', 'comment': 'True for all branch instructions.' }, - { 'name': 'is_terminator', 'comment': 'True for instructions that terminate EBB.' }, - { 'name': 'can_trap', 'comment': 'True if instruction could trap.' } + { + 'name': 'is_branch', + 'comment': 'True for all branch instructions.' + }, + { + 'name': 'is_terminator', + 'comment': 'True for instructions that terminate EBB.' + }, + { + 'name': 'can_trap', + 'comment': 'True if instruction could trap.' + } ] for attr in attrs: @@ -288,7 +297,9 @@ def gen_opcodes(groups, fmt): with fmt.indented('match self {', '}'): for i in instrs: if getattr(i, attr['name']): - fmt.format('Opcode::{} => true,', i.camel_name, i.name) + fmt.format( + 'Opcode::{} => true,', + i.camel_name, i.name) fmt.line('_ => false')