Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing signals in TOC #156

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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