Skip to content

Remove None from function signatures where possible #32

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

Merged
merged 6 commits into from
Jun 25, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion gt_extras/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def gt_highlight_cols(
def gt_hulk_col_numeric(
gt: GT,
columns: SelectExpr = None,
palette: str | list[str] | None = "PRGn",
palette: str | list[str] = "PRGn",
domain: list[str] | list[int] | list[float] | None = None,
na_color: str | None = None,
alpha: int | float | None = None, # TODO: see note
Expand Down
15 changes: 8 additions & 7 deletions gt_extras/icons.py
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change on line 23 preferable?

Switching from this:

a11y: Literal["deco", "sem"] | None = "deco"

To this

a11y: Literal["deco", "sem", "none"] = "deco"

Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
def fa_icon_repeat(
name: str = "star",
repeats: int = 1,
fill: str | None = "black",
fill_opacity: int | str | None = 1,
fill: str = "black",
fill_opacity: int | str = 1,
stroke: str | None = None,
stroke_width: str | None = None,
stroke_opacity: int | str | None = None,
height: str | None = None,
width: str | None = None,
margin_left: str | None = "auto",
margin_right: str | None = "0.2em",
position: str | None = "relative",
margin_left: str = "auto",
margin_right: str = "0.2em",
position: str = "relative",
title: str | None = None,
a11y: Literal["deco", "sem"] | None = "deco",
a11y: Literal["deco", "sem", "none"] = "deco",
) -> str:
"""
Create repeated FontAwesome SVG icons as HTML.
Expand Down Expand Up @@ -70,7 +70,8 @@ def fa_icon_repeat(
The title (tooltip) for the icon.

a11y
Accessibility mode: `"deco"` for decorative, `"sem"` for semantic.
Accessibility mode: `"deco"` for decorative, `"sem"` for semantic, `"none"` will result in
no accessibility features.

Returns
-------
Expand Down
Loading