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

Validated imports for known types #627

Merged
merged 1 commit into from
May 26, 2023
Merged

Conversation

tvainika
Copy link
Contributor

About this change - What it does

Validate that referred known types are imported before use. Also improve typing and mypy purity a bit.

This addresses partially: #626

Why this way

This is compatible behaviour with other protobuf implementations.

@tvainika tvainika requested review from a team as code owners May 25, 2023 12:33
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented May 25, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5770869
Status: ✅  Deploy successful!
Preview URL: https://cb737af5.karapace.pages.dev
Branch Preview URL: https://protobuf-import-check.karapace.pages.dev

View logs

aiven-anton
aiven-anton previously approved these changes May 26, 2023
Copy link
Contributor

@aiven-anton aiven-anton left a comment

Choose a reason for hiding this comment

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

LGTM.

@@ -79,9 +70,6 @@ ignore_errors = True
[mypy-karapace.protobuf.enum_constant_element]
ignore_errors = True

[mypy-karapace.protobuf.compare_result]
ignore_errors = True

Copy link
Contributor

Choose a reason for hiding this comment

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

⭐️

karapace/protobuf/dependency.py Outdated Show resolved Hide resolved
Validate that referred known types are imported before use.  Also
improve typing and mypy purity a bit.
@aiven-anton aiven-anton merged commit 9dd6ecc into main May 26, 2023
@aiven-anton aiven-anton deleted the protobuf-import-check branch May 26, 2023 08:33
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.

2 participants