MCPcopy Index your code
hub / github.com/plotly/plotly.py / kaleido_major

Function kaleido_major

plotly/io/_kaleido.py:76–88  ·  view source on GitHub ↗

Returns the major version number of Kaleido if it is installed, otherwise raises a ValueError.

()

Source from the content-addressed store, hash-verified

74
75
76def kaleido_major() -> int:
77 """
78 Returns the major version number of Kaleido if it is installed,
79 otherwise raises a ValueError.
80 """
81 global _KALEIDO_MAJOR
82 if _KALEIDO_MAJOR is not None:
83 return _KALEIDO_MAJOR
84 if not kaleido_available():
85 raise ValueError("Kaleido is not installed.")
86 else:
87 _KALEIDO_MAJOR = Version(importlib_metadata.version("kaleido")).major
88 return _KALEIDO_MAJOR
89
90
91try:

Callers 13

to_imageMethod · 0.90
write_imageMethod · 0.90
test_defaultsFunction · 0.90
test_fig_write_imageFunction · 0.90
test_fig_to_imageFunction · 0.90
test_get_chromeFunction · 0.90
_kaleido.pyFile · 0.85
to_imageFunction · 0.85
write_imageFunction · 0.85
write_imagesFunction · 0.85
plotly_get_chromeFunction · 0.85

Calls 2

kaleido_availableFunction · 0.85
versionMethod · 0.45

Tested by 4

test_defaultsFunction · 0.72
test_fig_write_imageFunction · 0.72
test_fig_to_imageFunction · 0.72
test_get_chromeFunction · 0.72