Skip to content

add iterator type to get_grouped_daily_aggs return #337

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

Merged
merged 3 commits into from
Dec 9, 2022
Merged

add iterator type to get_grouped_daily_aggs return #337

merged 3 commits into from
Dec 9, 2022

Conversation

ttytm
Copy link
Contributor

@ttytm ttytm commented Dec 5, 2022

Running into a type error that doesn't seem like it should be an error, I'm assuming this return type should be iterable. Like other similar returns give a collection of data.

the comments below describe it as List so something is most definitely off.
:return: List of grouped daily aggregates

@danielatpolygonio
Copy link
Contributor

Hi @tobealive ! Thanks for this PR! I think you are right that this should be Iterable, or maybe more concretely List.

Can you include a screenshot of the type error and maybe a snippet that triggers it in the description of the PR? I'm wondering why our type checking and tests aren't catching this.

@ttytm
Copy link
Contributor Author

ttytm commented Dec 6, 2022

hey @danielatpolygonio, thanks for covering this.
ofc.
this is the error:

Screenshot_20221206_202626
in nvim with pyright. Doubled checked with vscode, then it pops up as soon as turning Python > Analysis: Type Checking Mode to basic

Pyright: "GroupedDailyAgg" is not iterable
  "__iter__" method not defined [reportGeneralTypeIssues]

ttytm and others added 3 commits December 8, 2022 16:18
Co-authored-by: Ricky Barillas <8647805+jbonzo@users.noreply.github.com>
@jbonzo
Copy link
Collaborator

jbonzo commented Dec 9, 2022

@tobealive Thanks for the contribution! We appreciate it.

@jbonzo jbonzo merged commit 28ee2a0 into polygon-io:master Dec 9, 2022
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