refine code

This commit is contained in:
geekan 2023-12-19 17:11:02 +08:00 committed by better629
parent 67de313248
commit 1162f21b6c
2 changed files with 12 additions and 5 deletions

View file

@ -131,8 +131,20 @@ class Config(metaclass=Singleton):
self.workspace_path = Path(self._get("WORKSPACE_PATH", DEFAULT_WORKSPACE_ROOT))
self._ensure_workspace_exists()
def _init_cli_paras(self):
self.project_path = None
self.project_name = None
self.inc = None
self.reqa_file = None
self.max_auto_summarize_code = None
def update_via_cli(self, project_path, project_name, inc, reqa_file, max_auto_summarize_code):
"""update config via cli"""
# Use in the PrepareDocuments action according to Section 2.2.3.5.1 of RFC 135.
if project_path:
inc = True
project_name = project_name or Path(project_path).name
self.project_path = project_path
self.project_name = project_name
self.inc = inc