Skip to content
Open
Show file tree
Hide file tree
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
9 changes: 7 additions & 2 deletions mplbasketball/court3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ class Court3D:
- AssertionError: If the provided court_type is not 'nba', 'wnba', 'ncaa' or 'fiba'.
"""

def __init__(self, court_type="nba", origin=np.array([0.0, 0.0]), units="ft"):
def __init__(
self,
court_type: Literal["nba", "wnba", "ncaa", "fiba"] = "nba",
origin=np.array([0.0, 0.0]),
units: Literal["m", "ft"] = "ft",
):
assert court_type in [
"nba",
"wnba",
Expand All @@ -56,7 +61,7 @@ def draw(
paint_color="none",
line_color="black",
line_alpha=1.0,
line_width: float = None,
line_width: float | None = None,
hoop_alpha=1.0,
pad=5.0,
) -> tuple[Figure, Axes] | Figure:
Expand Down
Loading