Skip to content

Commit

Permalink
update docstrings for headers
Browse files Browse the repository at this point in the history
  • Loading branch information
K-Meech committed Apr 11, 2024
1 parent b095b3f commit 3556a72
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions brainglobe_utils/qtpy/logo.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
from importlib.resources import files
from typing import Optional

from qtpy.QtWidgets import QGroupBox, QHBoxLayout, QLabel, QWidget


def _docs_links_widget(
package_name: str,
package_tagline: str,
tutorial_file_name: str = None,
documentation_path: str = None,
citation_doi: str = None,
github_repo_name: str = None,
help_text: str = None,
parent: QWidget = None,
tutorial_file_name: Optional[str] = None,
documentation_path: Optional[str] = None,
citation_doi: Optional[str] = None,
github_repo_name: Optional[str] = None,
help_text: Optional[str] = None,
parent: Optional[QWidget] = None,
):
lines = [
"<h3>",
Expand Down Expand Up @@ -55,7 +56,7 @@ def _docs_links_widget(
return docs_links_widget


def _logo_widget(package_name: str, parent: QWidget = None):
def _logo_widget(package_name: str, parent: Optional[QWidget] = None):
brainglobe_logo = files("brainglobe_utils").joinpath("qtpy/brainglobe.png")

_logo_html = f"""
Expand All @@ -71,12 +72,12 @@ def _logo_widget(package_name: str, parent: QWidget = None):
def header_widget(
package_name: str,
package_tagline: str,
tutorial_file_name: str = None,
documentation_path: str = None,
citation_doi: str = None,
github_repo_name: str = None,
help_text: str = None,
parent: QWidget = None,
tutorial_file_name: Optional[str] = None,
documentation_path: Optional[str] = None,
citation_doi: Optional[str] = None,
github_repo_name: Optional[str] = None,
help_text: Optional[str] = None,
parent: Optional[QWidget] = None,
) -> QGroupBox:
"""
Render HTML in a QGroupBox with a BrainGlobe logo and links to the docs
Expand All @@ -92,7 +93,8 @@ def header_widget(
The name of the tutorial file (must include .html),
e.g. "brainrender-qtpy.html"
documentation_path : str, optional
The relative path of a documentation file (must include .html),
Path of documentation file relative to
https://brainglobe.info/documentation/ (must include .html),
e.g. "cellfinder/user-guide/napari-plugin/index.html"
citation_doi : str, optional
Doi of citation e.g. "https://doi.org/10.1371/journal.pcbi.1009074"
Expand All @@ -103,7 +105,7 @@ def header_widget(
help_text : str, optional
Help text to display at the bottom or the header e.g.
"For help, hover the cursor over each parameter."
parent : QWidget
parent : QWidget, optional
The parent widget, defaults to None
Returns
Expand Down

0 comments on commit 3556a72

Please sign in to comment.