Skip to content

Commit

Permalink
Don't require since if a class is marked deprecated
Browse files Browse the repository at this point in the history
Since these annotations are incompatible with each other, we must
accept either
  • Loading branch information
nyalldawson committed Jul 5, 2024
1 parent dcd45ad commit 30ed5c2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/code_layout/doxygen_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,11 @@ def parseClassElem(self, e):
if self.version_regex.match(ET.tostring(p).decode()):
found_version_added = True
break
for s in para.iter('xrefsect'):
if s.find('xreftitle') is not None and 'Deprecated' in s.find('xreftitle').text:
# can't have both deprecated and since, so if we've found deprecated then treat it as having satisified the "since" requirement too
found_version_added = True
break

if para.text and re.search(r'\btodo\b', para.text.lower()) is not None:
noncompliant_members.append({
Expand Down

0 comments on commit 30ed5c2

Please sign in to comment.