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 annotations to scripts.generator modules #1950

Merged
merged 9 commits into from
Jun 16, 2022

Conversation

ebeahan
Copy link
Member

@ebeahan ebeahan commented Jun 3, 2022

Overview

Continue the work in #1771 to gradually introduce type hints into the codebase.

Summary of changes

  • Add type annotations to modules in scripts/generators
  • Introduce basic unit tests for csv_generator
  • Correct a return type annotation in schema.subset_filter to note a Tuple.
  • Minor style and variable naming cleanup

@ebeahan ebeahan requested a review from a team as a code owner June 3, 2022 18:36
@ebeahan ebeahan self-assigned this Jun 3, 2022
Copy link
Contributor

@kgeller kgeller left a comment

Choose a reason for hiding this comment

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

LGTM

@ebeahan ebeahan merged commit 25ec625 into elastic:main Jun 16, 2022
@ebeahan ebeahan deleted the cont-with-type-hints branch June 16, 2022 16:31
ebeahan added a commit to ebeahan/ecs that referenced this pull request Jun 16, 2022
* add type hints to csv_generator

* introduce csv generator unit tests

* finish adding types to intermediate generator

* returns a tuple

* add type hints to beats generator

* unused import

* add type hints to elasticsearch generator

* use snake_case

* changelog

(cherry picked from commit 25ec625)

# Conflicts:
#	CHANGELOG.next.md
@ebeahan
Copy link
Member Author

ebeahan commented Jun 16, 2022

💚 All backports created successfully

Status Branch Result
8.4

Questions ?

Please refer to the Backport tool documentation

ebeahan added a commit that referenced this pull request Jun 16, 2022
* add type hints to csv_generator

* introduce csv generator unit tests

* finish adding types to intermediate generator

* returns a tuple

* add type hints to beats generator

* unused import

* add type hints to elasticsearch generator

* use snake_case

* changelog

(cherry picked from commit 25ec625)
mitodrummer pushed a commit to mitodrummer/ecs that referenced this pull request Jul 6, 2022
* add type hints to csv_generator

* introduce csv generator unit tests

* finish adding types to intermediate generator

* returns a tuple

* add type hints to beats generator

* unused import

* add type hints to elasticsearch generator

* use snake_case

* changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants