MCPcopy Index your code
hub / github.com/Tencent/CodeAnalysis / input_source_dir

Method input_source_dir

client/node/common/userinput.py:141–164  ·  view source on GitHub ↗

sourcedir 输入 :return: sourcedir

(self)

Source from the content-addressed store, hash-verified

139 return None
140
141 def input_source_dir(self):
142 """
143 sourcedir 输入
144 :return: sourcedir
145 """
146 def check_func(source_dir):
147 source_dir = PathMgr().format_path(source_dir)
148 if os.path.exists(source_dir):
149 return True
150 else:
151 return False
152 try:
153 source_dir = SmartInput().input(prompt="本地代码目录:",
154 check_func=check_func,
155 retry_prompt="路径不存在, 请重新输入:")
156 # 格式化目录路径,确保格式唯一
157 source_dir = PathMgr().format_path(source_dir)
158 return source_dir
159 except InputRetryError as err:
160 logger.warning(str(err))
161 return None
162 except EOFError as err:
163 logger.warning(str(err))
164 return None
165
166 def input_scm_type(self):
167 """

Callers 1

__check_config_infoMethod · 0.80

Calls 3

SmartInputClass · 0.90
inputMethod · 0.80
warningMethod · 0.80

Tested by

no test coverage detected