Fix context

This commit is contained in:
KennyDizi
2024-02-24 17:00:58 +07:00
parent f3a712683a
commit 3bcf085f61

View File

@ -72,7 +72,7 @@ class PRDescription:
# Initialize patches_diff and prediction attributes # Initialize patches_diff and prediction attributes
self.patches_diff = None self.patches_diff = None
self.prediction = None self.prediction = None
COLLAPSIBLE_FILE_LIST_THRESHOLD = 8 self.COLLAPSIBLE_FILE_LIST_THRESHOLD = 8
async def run(self): async def run(self):
""" """
@ -363,7 +363,7 @@ class PRDescription:
for semantic_label in value.keys(): for semantic_label in value.keys():
num_files += len(value[semantic_label]) num_files += len(value[semantic_label])
if use_collapsible_file_list == "adaptive": if use_collapsible_file_list == "adaptive":
use_collapsible_file_list = num_files > COLLAPSIBLE_FILE_LIST_THRESHOLD use_collapsible_file_list = num_files > self.COLLAPSIBLE_FILE_LIST_THRESHOLD
if not self.git_provider.is_supported("gfm_markdown"): if not self.git_provider.is_supported("gfm_markdown"):
get_logger().info(f"Disabling semantic files types for {self.pr_id} since gfm_markdown is not supported") get_logger().info(f"Disabling semantic files types for {self.pr_id} since gfm_markdown is not supported")