Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.2.1 命令行执行fetch命令有几个问题 #27

Open
RorschachWwww opened this issue Oct 27, 2024 · 0 comments
Open

v0.2.1 命令行执行fetch命令有几个问题 #27

RorschachWwww opened this issue Oct 27, 2024 · 0 comments

Comments

@RorschachWwww
Copy link

1.执行fetch langchain-ai/langchain命令会报错:main.py: error: unrecognized arguments: langchain-ai/langchain
看了一下代码发现CommandHandle.create_parser方法里,这里的代码没有给parser_fetch添加repo的argument:
parser_fetch = subparsers.add_parser('fetch', help='Fetch updates immediately')
parser_fetch.set_defaults(func=self.fetch_updates)
在中间加了一行:parser_fetch.add_argument('repo', type=str, help='The GitHub repository to fetch updates from')就不报这个错了。
2.改了第一条代码之后,执行还是会报错,看代码,发现CommandHandle.fetch_updates方法里
updates = self.github_client.fetch_updates()这一行没传repo参数。
改成updates = self.github_client.fetch_updates(args.repo)之后,fetch langchain-ai/langchain命令不报错了。
3.还是fetch方法,只打印了三行字符:
commits
issues
pull_requests,没有具体内容,可能是怕打印太多故意这么写的?CommandHandle.fetch_updates方法改成如下代码就能打印github返回的内容了:
def fetch_updates(self, args):
updates = self.github_client.fetch_updates(args.repo)
for key,value in updates.items():
print(f"{key}: {value}")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant