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 schema modules #1771

Merged
merged 21 commits into from
May 5, 2022
Merged

Conversation

ebeahan
Copy link
Member

@ebeahan ebeahan commented Feb 11, 2022

Gradually adding typing to the existing code base with two end goals:

  • help better document code
  • improve static analysis using IDEs and linters

No functional changes.

@ebeahan ebeahan self-assigned this Feb 11, 2022
@ebeahan ebeahan marked this pull request as ready for review April 8, 2022 18:47
@ebeahan ebeahan requested a review from a team as a code owner April 8, 2022 18:47
@ebeahan ebeahan merged commit a1bac19 into elastic:main May 5, 2022
@ebeahan ebeahan deleted the add-type-hints branch May 5, 2022 21:05
ebeahan added a commit to ebeahan/ecs that referenced this pull request May 5, 2022
* declare type hint classes for schema objects

* first pass defining type hints

* first pass applying type hints to cleaner

* linting

* adding hints to most helper functions

* adding additional fields

* changing to _ since not accessed

* adding type hints to visit

* adding type hints to exclude_filter

* linting

* add type hints to subset_filter

* add type hints to loader

* misc cleanup after mypy checks

* moving types to dedicated module

* fix import

* unused import

* convert to use f-string

* misc cleanup from mypy checks

* add changelog

Co-authored-by: Kylie Geller <[email protected]>
(cherry picked from commit a1bac19)
@ebeahan
Copy link
Member Author

ebeahan commented May 5, 2022

💚 All backports created successfully

Status Branch Result
8.3

Questions ?

Please refer to the Backport tool documentation

ebeahan added a commit that referenced this pull request May 5, 2022
* declare type hint classes for schema objects

* first pass defining type hints

* first pass applying type hints to cleaner

* linting

* adding hints to most helper functions

* adding additional fields

* changing to _ since not accessed

* adding type hints to visit

* adding type hints to exclude_filter

* linting

* add type hints to subset_filter

* add type hints to loader

* misc cleanup after mypy checks

* moving types to dedicated module

* fix import

* unused import

* convert to use f-string

* misc cleanup from mypy checks

* add changelog

Co-authored-by: Kylie Geller <[email protected]>
(cherry picked from commit a1bac19)
ebeahan added a commit to ebeahan/ecs that referenced this pull request May 16, 2022
* declare type hint classes for schema objects

* first pass defining type hints

* first pass applying type hints to cleaner

* linting

* adding hints to most helper functions

* adding additional fields

* changing to _ since not accessed

* adding type hints to visit

* adding type hints to exclude_filter

* linting

* add type hints to subset_filter

* add type hints to loader

* misc cleanup after mypy checks

* moving types to dedicated module

* fix import

* unused import

* convert to use f-string

* misc cleanup from mypy checks

* add changelog

Co-authored-by: Kylie Geller <[email protected]>
(cherry picked from commit a1bac19)

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

ebeahan commented May 16, 2022

💚 All backports created successfully

Status Branch Result
8.2

Questions ?

Please refer to the Backport tool documentation

ebeahan added a commit that referenced this pull request May 16, 2022
* declare type hint classes for schema objects

* first pass defining type hints

* first pass applying type hints to cleaner

* linting

* adding hints to most helper functions

* adding additional fields

* changing to _ since not accessed

* adding type hints to visit

* adding type hints to exclude_filter

* linting

* add type hints to subset_filter

* add type hints to loader

* misc cleanup after mypy checks

* moving types to dedicated module

* fix import

* unused import

* convert to use f-string

* misc cleanup from mypy checks

* add changelog

Co-authored-by: Kylie Geller <[email protected]>
(cherry picked from commit a1bac19)
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