8000 Add crypto, forex, and indices examples by justinpolygon · Pull Request #415 · massive-com/client-python · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@justinpolygon
Copy link
Collaborator

Added example code snippets for crypto, forex, and indices.

@justinpolygon justinpolygon marked this pull request as ready for review March 29, 2023 12:53
@justinpolygon
Copy link
Collaborator Author

@jbonzo FYI - it looks like it's actually the linter that made the changes and added the spacing across the lines. So, I changed the code like we chatted about to be:

>                 percent_change = ((item.prev_day.close - item.prev_day.open)/item.prev_day.open*100)
>                 print("{:<15}{:<15}{:<15}{:.2f} %".format(item.ticker,item.prev_day.open,item.prev_day.close,percent_change))

Then, the link check failed here https://github.com/polygon-io/client-python/actions/runs/4601386532/jobs/8129177080?pr=415 so I run poetry run black polygon test_* examples to make the suggested changes and it give me this:

<                 percent_change = (
<                     (item.prev_day.close - item.prev_day.open)
<                     / item.prev_day.open
<                     * 100
<                 )
<                 print(
<                     "{:<15}{:<15}{:<15}{:.2f} %".format(
<                         item.ticker,
<                         item.prev_day.open,
<                         item.prev_day.close,
<                         percent_change,
<                     )
<                 )

Updated code style to pass lint check.
@jbonzo
Copy link
Collaborator
jbonzo commented Apr 3, 2023

@jbonzo FYI - it looks like it's actually the linter that made the changes and added the spacing across the lines. So, I changed the code like we chatted about to be:


>                 percent_change = ((item.prev_day.close - item.prev_day.open)/item.prev_day.open*100)

>                 print("{:<15}{:<15}{:<15}{:.2f} %".format(item.ticker,item.prev_day.open,item.prev_day.close,percent_change))

Then, the link check failed here https://github.com/polygon-io/client-python/actions/runs/4601386532/jobs/8129177080?pr=415 so I run poetry run black polygon test_* examples to make the suggested changes and it give me this:


<                 percent_change = (

<                     (item.prev_day.close - item.prev_day.open)

<                     / item.prev_day.open

<                     * 100

<                 )

<                 print(

<                     "{:<15}{:<15}{:<15}{:.2f} %".format(

<                         item.ticker,

<                         item.prev_day.open,

<                         item.prev_day.close,

<                         percent_change,

<                     )

<                 )

Ah. Thats unfortunate. Ok then.

@justinpolygon justinpolygon merged commit 5d8560c into master Apr 3, 2023
@justinpolygon justinpolygon deleted the jw-add-cfi branch April 3, 2023 21:49
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

0