Skip to content

Commit 4db9b3e

Browse files
committed
fixed formatting
1 parent 58b82c0 commit 4db9b3e

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

test2text/pages/controls/controls_page.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ def controls_page():
1212

1313
def refresh_counts():
1414
with get_db_client() as db:
15-
st.session_state["all_annotations_count"] = (
16-
db.count_all_entries("Annotations")
15+
st.session_state["all_annotations_count"] = db.count_all_entries(
16+
"Annotations"
1717
)
1818
st.session_state["embedded_annotations_count"] = (
19-
db.count_notnull_entries("embedding",from_table="Annotations")
19+
db.count_notnull_entries("embedding", from_table="Annotations")
2020
)
2121

2222
refresh_counts()

test2text/pages/reports/report_by_tc.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ def write_requirements(current_requirements: set[tuple]):
8080
for (tc_id, _, test_case, distance) in data
8181
}
8282
else:
83-
tc_dict = {
84-
test_case: tc_id for (tc_id, _, test_case) in data
85-
}
83+
tc_dict = {test_case: tc_id for (tc_id, _, test_case) in data}
8684

8785
st.subheader("Choose ONE of filtered test cases")
8886
option = st.selectbox(

test2text/services/db/client.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@ def count_all_entries(self, from_table: str) -> int:
116116
count = self.conn.execute(f"SELECT COUNT(*) FROM {from_table}").fetchone()[0]
117117
return count
118118

119-
def count_notnull_entries(
120-
self, *columns: str, from_table: str
121-
) -> int:
119+
def count_notnull_entries(self, *columns: str, from_table: str) -> int:
122120
count = self.conn.execute(
123121
f"SELECT COUNT(*) FROM {from_table} WHERE {' AND '.join([column + ' IS NOT NULL' for column in columns])}"
124122
).fetchone()[0]

test2text/services/embeddings/annotation_embeddings_controls.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ def embed_annotations(*_, embed_all=False, on_progress: OnProgress = None):
1313
from .embed import embed_annotations_batch
1414

1515
annotations_count = db.count_all_entries("Annotations")
16-
embedded_annotations_count = db.count_notnull_entries("embedding",from_table="Annotations")
16+
embedded_annotations_count = db.count_notnull_entries(
17+
"embedding", from_table="Annotations"
18+
)
1719
if embed_all:
1820
annotations_to_embed = annotations_count
1921
else:

0 commit comments

Comments
 (0)