DOC: remove docstring of flags attribute during doc building process (#5331)