Skip to content

Commit a0d5b0f

Browse files
committed
Add warning for deprecated path argument
1 parent c656571 commit a0d5b0f

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/py/kaleido/kaleido.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
import asyncio
6+
import warnings
67
from collections import deque
78
from collections.abc import AsyncIterable, Iterable
89
from pathlib import Path
@@ -140,7 +141,7 @@ def __init__(
140141
if not installed, the latest version available via CDN.
141142
142143
mathjax (str | Path | Literal[False] | None, optional):
143-
A path or URL to a mathjax.js file. If Dalse, mathjax is
144+
A path or URL to a mathjax.js file. If False, mathjax is
144145
disabled. Defaults to None- which means to use version 2.35 via
145146
CDN.
146147
@@ -504,10 +505,18 @@ async def calc_fig(
504505
fig: fig_tools.Figurish,
505506
opts: None | fig_tools.LayoutOpts = None,
506507
*,
508+
path: None = None,
507509
topojson: str | None = None,
508510
stepper: bool = False,
509511
) -> bytes:
510512
"""Temp."""
513+
if path is not None:
514+
warnings.warn(
515+
"The path argument is deprecated in `kaleido.calc_fig`. "
516+
"It is ignored and will be removed in a future version",
517+
DeprecationWarning,
518+
stacklevel=2,
519+
)
511520

512521
async def _temp_generator():
513522
yield {

0 commit comments

Comments
 (0)