Merge pull request #7076 from tk0miya/6889_autodoc_trailing_comma

Fix #6889: autodoc: Trailing comma in :members:: option causes cryptic warning
This commit is contained in:
Takeshi KOMIYA authored and GitHub committed 2020-01-31 01:30:08 +09:00
commit 6e54043bd3
2 files changed
+3 -2

No files matched your search

+1
View File
@@ -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
* #7055: linkcheck: redirect is treated as an error
Testing
+2 -2
View File
@@ -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()