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

Add type hints to core modules #366

Merged
merged 4 commits into from
Aug 2, 2021
Merged

Conversation

V1NAY8
Copy link
Contributor

@V1NAY8 V1NAY8 commented Jul 28, 2021

No description provided.

@elasticmachine
Copy link

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@sethmlarson
Copy link
Contributor

jenkins test this please

@V1NAY8
Copy link
Contributor Author

V1NAY8 commented Jul 29, 2021

Ask Jenkins to test this.

@sethmlarson
Copy link
Contributor

jenkins test this please

1 similar comment
@sethmlarson
Copy link
Contributor

jenkins test this please

@V1NAY8
Copy link
Contributor Author

V1NAY8 commented Jul 29, 2021

Thanks, CI is good

Copy link
Contributor

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

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

This is incredible!!! 🤯 Thank you!

I've left a couple of comments and questions for you:

eland/dataframe.py Outdated Show resolved Hide resolved
eland/dataframe.py Outdated Show resolved Hide resolved
eland/operations.py Outdated Show resolved Hide resolved
eland/operations.py Outdated Show resolved Hide resolved
eland/operations.py Outdated Show resolved Hide resolved
eland/operations.py Outdated Show resolved Hide resolved
@@ -947,7 +984,7 @@ def aggs_groupby(
@staticmethod
def bucket_generator(
query_compiler: "QueryCompiler", body: "Query"
) -> Generator[List[str], None, List[str]]:
) -> Generator[Sequence[Any], None, Sequence[Any]]:
Copy link
Contributor

Choose a reason for hiding this comment

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

We should try to keep this type Generator[Sequence[str], None, Sequence[str]]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

[{'key': {'groupby_Cancelled': False}, 'doc_count': 11381, 'sum_dayOfWeek': {'value': 32242.0}, 'sum_FlightDelayMin': {'value': 536325.0}, 'sum_AvgTicketPrice': {'value': 7162656.040748596}}, {'key': {'groupby_Cancelled': True}, 'doc_count': 1678, 'sum_dayOfWeek': {'value': 4793.0}, 'sum_FlightDelayMin': {'value': 81825.0}, 'sum_AvgTicketPrice': {'value': 1041708.8814849854}}]

So actually its Sequence[Dict[str, Any]]
When I initially wrote it , type wasn't correct

eland/operations.py Show resolved Hide resolved
eland/query_compiler.py Outdated Show resolved Hide resolved
@sethmlarson
Copy link
Contributor

jenkins test this please

Copy link
Contributor

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

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

LGTM, thanks so much!!! 🎉

@V1NAY8
Copy link
Contributor Author

V1NAY8 commented Aug 2, 2021

Thank You so much!! :)

@sethmlarson sethmlarson merged commit 823f01c into elastic:master Aug 2, 2021
@V1NAY8 V1NAY8 deleted the add-type-hints branch August 2, 2021 16:51
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.

None yet

3 participants