Skip to content

Commit

Permalink
fixed mypy warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Wert <[email protected]>
  • Loading branch information
AlexanderWert committed Jul 7, 2023
1 parent 96d5e78 commit 111b560
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,13 @@ class AttributeTemplate(SemanticAttribute):
parameter_name: str = "key"

@staticmethod
def parse(
def parse_attribute_templates(
prefix, semconv_stability, yaml_attributes
) -> "Dict[str, AttributeTemplate]":
"""This method parses the yaml representation for semantic attributes
creating the respective SemanticAttribute objects.
"""This method parses the yaml representation for attribute templates
creating the respective AttributeTemplate objects.
"""
attributes = {} # type: Dict[str, SemanticAttribute]
attributes = {} # type: Dict[str, AttributeTemplate]
allowed_keys = (
"id",
"type",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def __init__(self, group):
self.attrs_by_name = SemanticAttribute.parse(
self.prefix, self.stability, group.get("attributes")
)
self.attr_templates_by_name = AttributeTemplate.parse(
self.attr_templates_by_name = AttributeTemplate.parse_attribute_templates(
self.prefix, self.stability, group.get("attribute_templates")
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_parse_deprecated(load_yaml):

def test_parse_attribute_templates(load_yaml):
yaml = load_yaml("attribute_templates.yml")
attribute_templates = AttributeTemplate.parse(
attribute_templates = AttributeTemplate.parse_attribute_templates(
"prefix", "", yaml.get("attribute_templates")
)

Expand Down

0 comments on commit 111b560

Please sign in to comment.