mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
C++, minor formatting
This commit is contained in:
parent
926fab0a01
commit
9362df53be
@ -3370,8 +3370,7 @@ class ASTClass(ASTBase):
|
||||
|
||||
|
||||
class ASTUnion(ASTBase):
|
||||
def __init__(self, name: ASTNestedName,
|
||||
attrs: List[ASTAttribute]) -> None:
|
||||
def __init__(self, name: ASTNestedName, attrs: List[ASTAttribute]) -> None:
|
||||
self.name = name
|
||||
self.attrs = attrs
|
||||
|
||||
@ -3397,8 +3396,7 @@ class ASTUnion(ASTBase):
|
||||
|
||||
|
||||
class ASTEnum(ASTBase):
|
||||
def __init__(self, name: ASTNestedName, scoped: str,
|
||||
underlyingType: ASTType,
|
||||
def __init__(self, name: ASTNestedName, scoped: str, underlyingType: ASTType,
|
||||
attrs: List[ASTAttribute]) -> None:
|
||||
self.name = name
|
||||
self.scoped = scoped
|
||||
|
@ -996,10 +996,9 @@ def test_domain_cpp_ast_attributes():
|
||||
# position: parameters and qualifiers
|
||||
check('function', 'void f() [[attr1]] [[attr2]]', {1: 'f', 2: '1fv'})
|
||||
|
||||
# position: class
|
||||
# position: class, union, enum
|
||||
check('class', '{key}[[nodiscard]] Foo', {1: 'Foo', 2: '3Foo'}, key='class')
|
||||
check('union', '{key}[[nodiscard]] Foo', {1: None, 2: '3Foo'}, key='union')
|
||||
# position: enum
|
||||
check('enum', '{key}[[nodiscard]] Foo', {1: None, 2: '3Foo'}, key='enum')
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user