make format.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
This commit is contained in:
Keith Rothman 2019-01-17 21:48:34 -08:00
parent da10417946
commit 9e585ef227
2 changed files with 5 additions and 6 deletions

View File

@ -225,8 +225,7 @@ def reduce_tile(pool, site_types, tile_type, tile_instances, database_file):
chunksize = 1
if len(tile_instances) < chunksize * 2:
iter = map(
lambda file: read_json5(file, database_file),
tile_instances)
lambda file: read_json5(file, database_file), tile_instances)
else:
print(
'{} Using pool.imap_unordered'.format(datetime.datetime.now()))

View File

@ -3,6 +3,7 @@ import progressbar
import pyjson5 as json5
import os.path
def create_tables(conn):
c = conn.cursor()
@ -47,8 +48,7 @@ class NodeLookup(object):
# build/specimen_001/tile_DSP_L_X34Y145.json5
root, _ = os.path.splitext(os.path.basename(tile_file))
tile = root[5:]
c.execute("INSERT INTO tile(name) VALUES (?);",
(tile,))
c.execute("INSERT INTO tile(name) VALUES (?);", (tile, ))
tile_pkeys[tile] = c.lastrowid
nodes_processed = set()
@ -69,8 +69,8 @@ class NodeLookup(object):
tile_pkey = tile_pkeys[tile]
c.execute(
"""
INSERT INTO wire(name, tile_pkey, node_pkey) VALUES (?, ?, ?);""", (
wire['wire'], tile_pkey, node_pkey))
INSERT INTO wire(name, tile_pkey, node_pkey) VALUES (?, ?, ?);""",
(wire['wire'], tile_pkey, node_pkey))
self.conn.commit()