mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #6889: autodoc: Trailing comma in :members:: option causes cryptic warning
This commit is contained in:
parent
569a5d53b0
commit
e4bc1a48ac
1
CHANGES
1
CHANGES
@ -63,6 +63,7 @@ Bugs fixed
|
||||
* #7023: autodoc: nested partial functions are not listed
|
||||
* #7023: autodoc: partial functions imported from other modules are listed as
|
||||
module members without :impoprted-members: option
|
||||
* #6889: autodoc: Trailing comma in ``:members::`` option causes cryptic warning
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -72,14 +72,14 @@ def members_option(arg: Any) -> Union[object, List[str]]:
|
||||
"""Used to convert the :members: option to auto directives."""
|
||||
if arg is None or arg is True:
|
||||
return ALL
|
||||
return [x.strip() for x in arg.split(',')]
|
||||
return [x.strip() for x in arg.split(',') if x.strip()]
|
||||
|
||||
|
||||
def members_set_option(arg: Any) -> Union[object, Set[str]]:
|
||||
"""Used to convert the :members: option to auto directives."""
|
||||
if arg is None:
|
||||
return ALL
|
||||
return {x.strip() for x in arg.split(',')}
|
||||
return {x.strip() for x in arg.split(',') if x.strip()}
|
||||
|
||||
|
||||
SUPPRESS = object()
|
||||
|
Loading…
Reference in New Issue
Block a user