Skip to content

Commit

Permalink
python: Run latest yapf.
Browse files Browse the repository at this point in the history
Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
  • Loading branch information
mithro committed Jun 22, 2018
1 parent faa872e commit a8b0c87
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
9 changes: 4 additions & 5 deletions experiments/example/segdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
continue

segname = "%s_%02x" % (
tiledata["cfgcol"]["BASE_FRAMEID"][2:],
min(tiledata["cfgcol"]["WORDS"]))
tiledata["cfgcol"]["BASE_FRAMEID"][2:], min(
tiledata["cfgcol"]["WORDS"]))

if not segname in segments:
segments[segname] = {"bits": list(), "tags": dict()}
Expand Down Expand Up @@ -122,9 +122,8 @@
for bit_frame, bit_wordidx, bit_bitidx in bits[base_frame][wordidx]:
segments[segname]["bits"].append(
"%02x_%02x_%02x" % (
bit_frame - base_frame,
bit_wordidx - min(tiledata["cfgcol"]["WORDS"]),
bit_bitidx))
bit_frame - base_frame, bit_wordidx - min(
tiledata["cfgcol"]["WORDS"]), bit_bitidx))

segments[segname]["bits"].sort()

Expand Down
6 changes: 3 additions & 3 deletions htmlgen/htmlgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,9 +709,9 @@ def print_table_header():
" unused: %d, unknown: %d, known: %d, total: %d, percentage: %.2f%% (%.2f%%)"
% (
unused_bits, unknown_bits, known_bits,
unused_bits + unknown_bits + known_bits,
100 * known_bits / (unknown_bits + unused_bits + known_bits),
100 * (known_bits + unused_bits) /
unused_bits + unknown_bits + known_bits, 100 * known_bits /
(unknown_bits + unused_bits + known_bits), 100 *
(known_bits + unused_bits) /
(unknown_bits + unused_bits + known_bits)))


Expand Down
2 changes: 1 addition & 1 deletion tools/bittool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace xc7series = prjxray::xilinx::xc7series;

struct Action {
std::string name;
std::function<int(int, char* [])> handler;
std::function<int(int, char*[])> handler;
};

int ListConfigPackets(int argc, char* argv[]) {
Expand Down
4 changes: 2 additions & 2 deletions tools/fasm2frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ def dump_frames_verbose(frames):
for addr in sorted(frames.keys()):
words = frames[addr]
print(
'0x%08X ' % addr + ', '.join(['0x%08X' % w
for w in words]) + '...')
'0x%08X ' % addr + ', '.join(['0x%08X' % w for w in words]) +
'...')


def dump_frames_sparse(frames):
Expand Down
8 changes: 4 additions & 4 deletions tools/simpleroute.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def db_gen():
node_node_pip[src_node] = dict()
if dst_node not in reverse_node_node:
reverse_node_node[dst_node] = set()
node_node_pip[src_node][dst_node] = "%s.%s.%s" % (
tile, dst, src)
node_node_pip[src_node][
dst_node] = "%s.%s.%s" % (tile, dst, src)
reverse_node_node[dst_node].add(src_node)

return type_to_tiles, grid_to_tile, nodes, node_node_pip, reverse_node_node
Expand Down Expand Up @@ -141,8 +141,8 @@ def write_scores(nodes, count):
try:
write_scores(set([dst_node]), 1)
except RecursionError as e:
raise Exception("Could not find route for node %s" %
(dst_node, )) from None
raise Exception(
"Could not find route for node %s" % (dst_node, )) from None
print(" route length: %d" % node_scores[src_node])

count = 0
Expand Down

0 comments on commit a8b0c87

Please sign in to comment.