From 5538b1d7326d6c06e17b8b4db8495e8839aeca76 Mon Sep 17 00:00:00 2001 From: wuyuhan Date: Tue, 16 Jul 2024 19:08:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4-D,=20=E4=BB=85=E4=BF=9D?= =?UTF-8?q?=E7=95=99--debug;=20=E4=BF=AE=E6=94=B9Problem=E4=B8=BACategory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- profiler/advisor/result/item.py | 2 +- profiler/advisor/result/result.py | 4 ++-- profiler/advisor/utils/utils.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/profiler/advisor/result/item.py b/profiler/advisor/result/item.py index fa0ffb5b1c7..02db7fdd004 100644 --- a/profiler/advisor/result/item.py +++ b/profiler/advisor/result/item.py @@ -15,7 +15,7 @@ class OptimizeItem: @property def headers(self): - return ["problem", "description", "suggestion"] + return ["category", "description", "suggestion"] class StatisticsItem: diff --git a/profiler/advisor/result/result.py b/profiler/advisor/result/result.py index c7d7da8663c..70433f32f2b 100644 --- a/profiler/advisor/result/result.py +++ b/profiler/advisor/result/result.py @@ -173,9 +173,9 @@ class TerminalResult: def __init__(self): self.width, _ = self.get_terminal_size() if self.width is None: - self.table = PrettyTable(["No.", "Problem", "Description", "Suggestion"]) + self.table = PrettyTable(["No.", "Category", "Description", "Suggestion"]) else: - self.table = PrettyTable(["No.", "Problem", "Description", "Suggestion"], + self.table = PrettyTable(["No.", "Category", "Description", "Suggestion"], max_table_width=max(self.width - 20, 180)) self.table.hrules = ALL self.result_list = [] diff --git a/profiler/advisor/utils/utils.py b/profiler/advisor/utils/utils.py index 84419b67087..2a16b2245ee 100644 --- a/profiler/advisor/utils/utils.py +++ b/profiler/advisor/utils/utils.py @@ -43,7 +43,7 @@ class ContextObject(object): def debug_option(f): - return click.option('--debug', '-D', + return click.option('--debug', is_flag=True, expose_value=False, is_eager=True, -- Gitee