Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
fix: 对环境判断以处理开发环境由于配置文件路径不存在导致的异常 #225
fix: 对环境判断以处理开发环境由于配置文件路径不存在导致的异常 #225
Changes from 3 commits
1331268
3f64e08
5a7b19b
9ef7e72
31f32f2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是预期行为吗?是不是至少应该是
/Users/richardli1598/.config
? 那么是不是如下代码更合适:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是预期行为吧,这里源代码结构一般clone下来是有两层kubespider目录吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
例如:代码clone下来在/Users/ljt/code/kubespider 目录下,那么os.getcwd()应该是/Users/ljt/code/kubespider/kubespider,那么os.path.dirname(os.getcwd())就是/Users/ljt/code/kubespider,即代码根目录,join上.config 就是默认配置模板目录
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的,感谢解释。
这里麻烦加点注释,说明一下,运行时,需要在
{repo_root}/kubespider/kubespider
下面运行,其他地方运行可能不行There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注释和校验容器运行方式按照你说的格式改了,然后我看了下,ci报错好像不是我那段代码报错,我pr里面有个pylint 的style错误,好像是多加了一行空格,这个我也改了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个应该如下修改就行:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯这个我修改了,但是我看这个pylint还有导入包顺序限制?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯嗯,现在ok了,一般顺序是 系统,第三方,本项目库
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
额,开源新手,github这些流程还不太会。麻烦你了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
欢迎下次贡献,一起共建!