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

Requests using style fix #1691

Merged
merged 6 commits into from
Apr 17, 2022
Merged

Conversation

PzaThief
Copy link
Contributor

Description

There are many json() function calls of requests.response repeatedly.
If it call json() once and store in variables, it is faster than call json() several times.
of coures most of waiting time is for request, but I expect many a little makes a mickle.

and stocktwits_model.get_messages and stocktwits_model.get_stalker had a bug about limit.
it takes array of limit+1 length not limit. so I fixed it and changed style for improve performance.

@jmaslek
Copy link
Collaborator

jmaslek commented Apr 12, 2022

Nice! Looks like black is failing on the CI, so you can just fix that up by running black ./

@PzaThief
Copy link
Contributor Author

Nice! Looks like black is failing on the CI, so you can just fix that up by running black ./

thanks!. I applied black formatting. could you check if it can be merged again?

Copy link
Collaborator

@DidierRLopes DidierRLopes left a comment

Choose a reason for hiding this comment

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

Nice one! 🚀

@DidierRLopes DidierRLopes merged commit 8a9d8fe into OpenBB-finance:main Apr 17, 2022
@PzaThief PzaThief deleted the requests-style-fix branch May 3, 2022 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants