def attributes_section(thing, doc, header_level):
<EOL>if not inspect.isclass(thing):<EOL><INDENT>return []<EOL><DEDENT>props, class_doc = _split_props(thing, doc["<STR_LIT>"])<EOL>tl = type_list(inspect.signature(thing), class_doc, "<STR_LIT>")<EOL>if len(tl) == <NUM_LIT:0> and len(props) > <NUM_LIT:0>:<EOL><INDENT>tl.append("<STR_LIT>")<EOL><DEDENT>for prop in props:<EOL><INDENT>tl.append(f"<STR_LIT>")<EOL><DEDENT>return tl<EOL>
Generate an attributes section for classes.

Prefers type annotations, if they are present.

Parameters
----------
thing : class
    Class to document
doc : dict
    Numpydoc output
header_level : int
    Number of `#`s to use for header

Returns
-------
list of str
    Markdown formatted attribute list