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

Consider using proper type annotations #234

Open
arminru opened this issue Nov 2, 2023 · 0 comments
Open

Consider using proper type annotations #234

arminru opened this issue Nov 2, 2023 · 0 comments
Labels
semconv Related to the semantic convention generator.

Comments

@arminru
Copy link
Member

arminru commented Nov 2, 2023

          I think the "proper" solution would be to switch from legacy `# type:` comments to using actual annotations.

For example, instead of:

mandatory_keys = ("id", "brief")  # type: Tuple[str, ...]

use:

mandatory_keys: Tuple[str, ...] = ("id", "brief")

And since we probably rely on 3.9+ anyway, one could even use the built-in tuple support for generic arguments and drop the import, using:

mandatory_keys: tuple[str, ...] = ("id", "brief")

Not a blocking comment, just a suggestion.

Originally posted by @Oberon00 in #231 (comment)

@lmolkova lmolkova added the semconv Related to the semantic convention generator. label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semconv Related to the semantic convention generator.
Projects
Development

No branches or pull requests

2 participants