Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed Feb 26, 2024
1 parent 345b25d commit 8fa208a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,14 @@ def _check_attribute(self, prev: SemanticAttribute, problems: list[Problem]):
self._check_attribute_type(prev, cur, problems)

if isinstance(prev.attr_type, EnumAttributeType):
cur_enum_attr = cur.attr_type # type: EnumAttributeType
for member in prev.attr_type.members:
self._check_member(prev.fqn, member, cur.attr_type.members, problems)
self._check_member(prev.fqn, member, cur_enum_attr.members, problems)

def _check_stability(
self,
prev: SemanticAttribute,
cur: SemanticAttribute,
prev: StabilityLevel,
cur: StabilityLevel,
signal: str,
fqn: str,
problems: list[Problem],
Expand All @@ -91,7 +92,7 @@ def _check_stability(
)

def _check_attribute_type(
self, prev: EnumAttributeType, cur: EnumAttributeType, problems: list[Problem]
self, prev: SemanticAttribute, cur: SemanticAttribute, problems: list[Problem]
):
if isinstance(prev.attr_type, EnumAttributeType):
if not isinstance(cur.attr_type, EnumAttributeType):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def testTypeChanged(self):
]
self.assert_errors(expected_errors, problems)

def testStableEnumTypeChanged(self):
def testEnumTypeChanged(self):
cur = self.parse_semconv("compat/enum_type_changed/vnext.yaml")
prev = self.parse_semconv("compat/enum_type_changed/vprev.yaml")
checker = CompatibilityChecker(cur, prev)
Expand All @@ -154,7 +154,7 @@ def testStableEnumTypeChanged(self):
]
self.assert_errors(expected_errors, problems)

def testStableEnumValueChanged(self):
def testEnumValueChanged(self):
cur = self.parse_semconv("compat/enum_value_changed/vnext.yaml")
prev = self.parse_semconv("compat/enum_value_changed/vprev.yaml")
checker = CompatibilityChecker(cur, prev)
Expand Down

0 comments on commit 8fa208a

Please sign in to comment.