-
Notifications
You must be signed in to change notification settings - Fork 11
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
Bug fix from get_files method. #58
Conversation
Thanks for your interest and reporting! |
3dfe0e2
to
0c6b138
Compare
0c6b138
to
bb8197b
Compare
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.
Thanks for providing reproducible scenario by adding integration tests. I think your first commit to fix the issue is a better approach than throwing an exception.
@hexoul Thanks for your review 🙇♂️ # In my local
$ black --check .
All done! ✨ 🍰 ✨
37 files would be left unchanged.
What should I do? |
@chickenchickenlove One possibility is that there is a difference in the version of black.
|
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.
LGTM. Please fix black issue.
@hexoul Thanks a lot. |
Background
content_service.get_files()
has potential bugs. because it useshttpx.client()
.I assume the following scenario.
I send a request to
Central Dogma
with pattern/*s.json
.There are three possible cases
httpx.client.json()
returns alist[dict[str, str]]
.httpx.client.json()
returns adict[str,str]
In case2, the Central Dogma client throws an unexpected error.
Because
Content.from_dict(content)
receives an unexpected argument of typestr
.