Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed May 9, 2022
1 parent db5f63e commit be2ec0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
9 changes: 5 additions & 4 deletions sphinx_toolbox/more_autodoc/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,11 +444,12 @@ def get_doc( # type: ignore[override]
:param ignore:
"""

# Disable `autodoc_inherit_docstring` temporarily to avoid to obtain
# a docstring from the value which descriptor returns unexpectedly.
# ref: https://github.com/sphinx-doc/sphinx/issues/7805
orig = self.env.config.autodoc_inherit_docstrings

try:
# Disable `autodoc_inherit_docstring` temporarily to avoid to obtain
# a docstring from the value which descriptor returns unexpectedly.
# ref: https://github.com/sphinx-doc/sphinx/issues/7805
orig = self.env.config.autodoc_inherit_docstrings
self.env.config.autodoc_inherit_docstrings = False # type: ignore[attr-defined]

# Sphinx's signature is wrong wrt Optional
Expand Down
5 changes: 1 addition & 4 deletions sphinx_toolbox/more_autosummary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,7 @@ def is_filtered_inherited_member(name: str) -> bool:
# process members and determine which to skip
for (membername, member) in members:
# if isattr is True, the member is documented as an attribute
if member is INSTANCEATTR or (namespace, membername) in attr_docs:
isattr = True
else:
isattr = False
isattr = (member is INSTANCEATTR or (namespace, membername) in attr_docs)

doc = getdoc(
member,
Expand Down

0 comments on commit be2ec0c

Please sign in to comment.