Skip to content

Commit c171f8c

Browse files
committed
code tidy
1 parent ce5258d commit c171f8c

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

countess/gui/tabular.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,7 @@ def set_sort_order(self, column_num: int, descending: Optional[bool] = None):
239239
# Include all column names for a stable sort order.
240240
column_name = self.table.columns[column_num]
241241
escaped_column_names = [
242-
duckdb_escape_identifier(c)
243-
for c in [ column_name ] + [ c for c in self.table.columns if c != column_name ]
242+
duckdb_escape_identifier(c) for c in [column_name] + [c for c in self.table.columns if c != column_name]
244243
]
245244

246245
# We add an index for whatever column we're sorting by,
@@ -253,14 +252,15 @@ def set_sort_order(self, column_num: int, descending: Optional[bool] = None):
253252
# XXX workaround for https://github.com/duckdb/duckdb/issues/16086
254253
if not self.ddbc.sql(f"select 1 from duckdb_indexes() where index_name = {index_literal}"):
255254
sql = (
256-
f"CREATE INDEX IF NOT EXISTS {index_identifier} ON {self.table.alias} (" +
257-
','.join(escaped_column_names) + ")"
255+
f"CREATE INDEX IF NOT EXISTS {index_identifier} ON {self.table.alias} ("
256+
+ ",".join(escaped_column_names)
257+
+ ")"
258258
)
259259
logger.debug("TabularDataFrame set_sort_order index sql %s", sql)
260260
self.ddbc.sql(sql)
261261

262262
direction = "ASC" if self.sort_ascending else "DESC"
263-
self.table_order = ','.join(f"{c} {direction}" for c in escaped_column_names)
263+
self.table_order = ",".join(f"{c} {direction}" for c in escaped_column_names)
264264

265265
logger.debug("TabularDataFrame set_sort_order %s %s", column_name, self.table_order)
266266

countess/plugins/score_scale.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class ScoreScalingPlugin(DuckdbSimplePlugin):
4646
version = VERSION
4747

4848
score_col = ColumnChoiceParam("Score Column")
49-
classifiers = ArrayParam("Variant Classifiers", ScaleClassParam("Class"), min_size=2, max_size=2)
49+
classifiers = ArrayParam("Variant Classifiers", ScaleClassParam("Class"), min_size=2, max_size=2, read_only=True)
5050
group_col = ColumnOrNoneChoiceParam("Group By")
5151

5252
def execute(

0 commit comments

Comments
 (0)