mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-07-22 05:23:59 +02:00
docs: update docstrings
This commit is contained in:
@@ -49,12 +49,10 @@ class FieldSuggestBox(SuggestBox[BaseFieldTemplate]):
|
||||
|
||||
@override
|
||||
def _on_item_create(self) -> None:
|
||||
"""Opens panel to create a new field template and optionally add it to an entry.
|
||||
"""Creates a new field template and adds it to the currently selected entries.
|
||||
|
||||
Optionally opens up an edit panel after creation and before adding to entries.
|
||||
Populates name field using current search query.
|
||||
|
||||
Args:
|
||||
add_to_entry (bool): Should this item be added to currently selected entries?
|
||||
"""
|
||||
# NOTE: Unlike tags, creating new field templates will ALWAYS spawn an edit window
|
||||
# since the user needs to decide what type of field it should be before it's created.
|
||||
|
||||
@@ -278,5 +278,4 @@ class PreviewPanel(QWidget):
|
||||
|
||||
@override
|
||||
def layout(self) -> PreviewPanelView:
|
||||
"""Return the typed layout for this widget."""
|
||||
return super().layout() # pyright: ignore[reportReturnType]
|
||||
|
||||
@@ -216,7 +216,6 @@ class SuggestBox[T](QWidget):
|
||||
|
||||
@override
|
||||
def layout(self) -> SuggestBoxView:
|
||||
"""Return the typed layout for this widget."""
|
||||
return super().layout() # pyright: ignore[reportReturnType]
|
||||
|
||||
@override
|
||||
|
||||
@@ -57,12 +57,10 @@ class TagSuggestBox(SuggestBox[Tag]):
|
||||
|
||||
@override
|
||||
def _on_item_create(self) -> None:
|
||||
"""Opens panel to create a new tag and optionally add it to an entry.
|
||||
"""Creates a new tag and adds it to the currently selected entries.
|
||||
|
||||
Optionally opens up an edit panel after creation and before adding to entries.
|
||||
Populates name field using current search query.
|
||||
|
||||
Args:
|
||||
add_to_entry (bool): Should this item be added to currently selected entries?
|
||||
"""
|
||||
query: str = self.layout().search_field.text()
|
||||
|
||||
|
||||
@@ -23,5 +23,4 @@ class UnderlinedWidget(QWidget):
|
||||
|
||||
@override
|
||||
def layout(self) -> UnderlinedWidgetView:
|
||||
"""Return the typed layout for this widget."""
|
||||
return super().layout() # pyright: ignore[reportReturnType]
|
||||
|
||||
Reference in New Issue
Block a user