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

Create setup.py and add bot apis #6

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Create setup.py and add bot apis #6

wants to merge 5 commits into from

Conversation

jackw1997
Copy link
Contributor

No description provided.

tongl2 and others added 3 commits May 2, 2022 17:23
1.3. ~~美化目录结构和代码格式,提升可维护性。~~
2.2. ~~excel模板搞一个管理器,支持通过字符串查找模板~~

Signed-off-by: Haphaistos2333 <[email protected]>
@jackw1997 jackw1997 requested a review from tongl2 May 2, 2022 21:16
Guangzheng Wu added 2 commits May 3, 2022 05:56
@tongl2
Copy link
Contributor

tongl2 commented May 3, 2022

感觉就是两处返回错误提示信息的地方,确认下当前这样ok不。其它没看出啥问题,功能ok可以合入

@wj-Mcat
Copy link
Collaborator

wj-Mcat commented May 3, 2022

Please review it and make it merged.

parser = excel_parser(open(input_file_path, 'rb'))
result, errors = parser.parse_for_community(community_parser())
if errors:
return f"以下单元格数据无法识别,请检查:\n{errors}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

返回失败和成功的类型都是str,调用者如何分辨这是成功后生成的路径还是错误提示信息呢?

workbook.save(input_file_path)
return True
except Exception as error:
print(f"Cannot modify file {input_file_path}, error:\n {error}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这条错误信息调用者get不到,这个只在后台打印还是需要用户感知一下?

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

Successfully merging this pull request may close these issues.

3 participants