Skip to content

Commit 068c9b9

Browse files
committed
fix code style
1 parent 5fd4bc9 commit 068c9b9

File tree

9 files changed

+19
-15
lines changed

9 files changed

+19
-15
lines changed

examples/storm_examples/run_storm_wiki_mistral.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
storm_gen_article.txt # Final article generated
1616
storm_gen_article_polished.txt # Polished final article (if args.do_polish_article is True)
1717
"""
18+
1819
import os
1920
from argparse import ArgumentParser
2021

examples/storm_examples/run_storm_wiki_ollama.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
storm_gen_article.txt # Final article generated
1616
storm_gen_article_polished.txt # Polished final article (if args.do_polish_article is True)
1717
"""
18+
1819
import os
1920
import sys
2021
from argparse import ArgumentParser

frontend/demo_light/pages_util/CreateNewArticle.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ def handle_not_started():
3434
]:
3535
if not st.session_state["page3_topic"].strip():
3636
pass_appropriateness_check = False
37-
st.session_state[
38-
"page3_warning_message"
39-
] = "topic could not be empty"
37+
st.session_state["page3_warning_message"] = (
38+
"topic could not be empty"
39+
)
4040

4141
st.session_state["page3_topic_name_cleaned"] = (
4242
st.session_state["page3_topic"]

frontend/demo_light/pages_util/MyArticles.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ def my_articles_page():
2323
if "page2_user_articles_file_path_dict" not in st.session_state:
2424
local_dir = os.path.join(demo_util.get_demo_dir(), "DEMO_WORKING_DIR")
2525
os.makedirs(local_dir, exist_ok=True)
26-
st.session_state[
27-
"page2_user_articles_file_path_dict"
28-
] = DemoFileIOHelper.read_structure_to_dict(local_dir)
26+
st.session_state["page2_user_articles_file_path_dict"] = (
27+
DemoFileIOHelper.read_structure_to_dict(local_dir)
28+
)
2929

3030
# if no feature demo selected, display all featured articles as info cards
3131
def article_card_setup(column_to_add, card_title, article_name):

knowledge_storm/dataclass.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -773,9 +773,9 @@ def merge_node(node):
773773
def update_all_info_path(self):
774774
def _helper(node):
775775
for citation_idx in node.content:
776-
self.info_uuid_to_info_dict[citation_idx].meta[
777-
"placement"
778-
] = " -> ".join(node.get_path_from_root())
776+
self.info_uuid_to_info_dict[citation_idx].meta["placement"] = (
777+
" -> ".join(node.get_path_from_root())
778+
)
779779
for child in node.children:
780780
_helper(child)
781781

knowledge_storm/encoder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class Encoder:
5353
Refer to the LiteLLM documentation for details on supported embedding models:
5454
https://docs.litellm.ai/docs/embedding/supported_embedding
5555
"""
56+
5657
def __init__(
5758
self,
5859
encoder_type: Optional[str] = None,

knowledge_storm/interface.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -502,9 +502,9 @@ def wrapper(*args, **kwargs):
502502
logger.info(f"{func.__name__} executed in {execution_time:.4f} seconds")
503503
self.lm_cost[func.__name__] = self.lm_configs.collect_and_reset_lm_usage()
504504
if hasattr(self, "retriever"):
505-
self.rm_cost[
506-
func.__name__
507-
] = self.retriever.collect_and_reset_rm_usage()
505+
self.rm_cost[func.__name__] = (
506+
self.retriever.collect_and_reset_rm_usage()
507+
)
508508
return result
509509

510510
return wrapper

knowledge_storm/lm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ def __call__(self, prompt=None, messages=None, **kwargs):
269269
# The following language model classes were deprecated after v1.0.2.
270270
# They remain in this file for backward compatibility but will no longer be maintained.
271271

272+
272273
class OpenAIModel(dspy.OpenAI):
273274
"""A wrapper class for dspy.OpenAI."""
274275

knowledge_storm/storm_wiki/modules/storm_dataclass.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ class StormInformationTable(InformationTable):
5858
def __init__(self, conversations=List[Tuple[str, List[DialogueTurn]]]):
5959
super().__init__()
6060
self.conversations = conversations
61-
self.url_to_info: Dict[
62-
str, Information
63-
] = StormInformationTable.construct_url_to_info(self.conversations)
61+
self.url_to_info: Dict[str, Information] = (
62+
StormInformationTable.construct_url_to_info(self.conversations)
63+
)
6464

6565
@staticmethod
6666
def construct_url_to_info(

0 commit comments

Comments
 (0)