Skip to content

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]

@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