Skip to content

Commit 9a32486

Browse files
committed
lint
1 parent 9a95f2e commit 9a32486

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/semsql/sqlutils/view2table.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
# DEPRECATED
1010

11+
1112
@click.command()
1213
@click.argument("inputs", nargs=-1)
1314
@click.option("--index/--no-index", default=True, help="Create indexes on each column")
@@ -16,7 +17,7 @@
1617
"-n",
1718
help="Name of class/view to materialize. If blank, will perform for ALL",
1819
)
19-
def cli(inputs, name: str, index: bool, combinatorial: bool=False):
20+
def cli(inputs, name: str, index: bool, combinatorial: bool = False):
2021
"""
2122
Generates a command that turns a view into a table
2223
@@ -45,12 +46,15 @@ def cli(inputs, name: str, index: bool, combinatorial: bool=False):
4546
raise ValueError("Cannot use combinatorial without index")
4647
s = sv.class_slots(cn)
4748
powerset = itertools.chain.from_iterable(
48-
itertools.combinations(s, r) for r in range(len(s) + 1))
49+
itertools.combinations(s, r) for r in range(len(s) + 1)
50+
)
4951
for sns in powerset:
5052
colnames = [underscore(sn) for sn in sns]
51-
colnames_str = '_'.join(colnames)
52-
colnames_commasep = ','.join(colnames)
53-
print(f"CREATE INDEX {tn}_{colnames_str} ON {tn}({colnames_commasep});")
53+
colnames_str = "_".join(colnames)
54+
colnames_commasep = ",".join(colnames)
55+
print(
56+
f"CREATE INDEX {tn}_{colnames_str} ON {tn}({colnames_commasep});"
57+
)
5458

5559

5660
if __name__ == "__main__":

0 commit comments

Comments
 (0)