Skip to content

Commit

Permalink
Fix missing signals in TOC
Browse files Browse the repository at this point in the history
Fixes #147
  • Loading branch information
nyalldawson committed Aug 8, 2024
1 parent 93fb247 commit 2b0a289
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions autoautosummary.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# added toctree and nosignatures in options

from enum import Enum
from typing import Any
from typing import Any, List, Optional

import PyQt5
from docutils import nodes
Expand Down Expand Up @@ -50,7 +50,7 @@ def skip_member(doc, obj: Any, name: str, objtype: str) -> bool:
return False

@staticmethod
def get_members(doc, obj, typ, include_public=None, signal=False, enum=False):
def get_members(doc, obj, typ, include_public: Optional[List]=None, signal=False, enum=False):
try:
if not include_public:
include_public = []
Expand All @@ -69,7 +69,7 @@ def get_members(doc, obj, typ, include_public=None, signal=False, enum=False):
if skipped is True:
continue
if typ == "attribute":
if signal and isinstance(chobj, PyQt5.QtCore.pyqtSignal):
if signal and not isinstance(chobj, PyQt5.QtCore.pyqtSignal):
continue
if not signal and isinstance(chobj, PyQt5.QtCore.pyqtSignal):
continue
Expand Down Expand Up @@ -114,7 +114,7 @@ def run(self):
)
elif "signals" in self.options:
rubric_title = "Signals"
_, rubric_elems = self.get_members(self.state.document, c, "attribute", None, True)
_, rubric_elems = self.get_members(self.state.document, c, "attribute", None, signal=True)
elif "attributes" in self.options:
rubric_title = "Attributes"
_, rubric_elems = self.get_members(
Expand Down

0 comments on commit 2b0a289

Please sign in to comment.