python-color-math 0.2.16__py3-none-any.whl → 0.2.17__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
color_math/__init__.py CHANGED
@@ -7,7 +7,7 @@ from .undo import uncolor_text
7
7
 
8
8
  from .ipython import ColorMath, colormath, load_ipython_extension, unload_ipython_extension
9
9
 
10
- __version__ = "0.2.16"
10
+ __version__ = "0.2.17"
11
11
 
12
12
  __all__ = [
13
13
  "__version__",
color_math/ipython.py CHANGED
@@ -257,6 +257,17 @@ if HAS_IPYTHON:
257
257
  if self._orig_math_repr is not None:
258
258
  Math._repr_latex_ = self._orig_math_repr # type: ignore[assignment]
259
259
  self._auto_hook_active = False
260
+ else:
261
+ class ColorMath: # type: ignore[no-redef]
262
+ """Fallback when IPython is not installed."""
263
+
264
+ def __init__(self, *args: Any, **kwargs: Any) -> None:
265
+ raise ImportError(
266
+ "IPython is required to use ColorMath. Install it with 'pip install ipython' or 'pip install python-color-math[jupyter]'."
267
+ )
268
+
269
+ class ColorMathMagics: # type: ignore[no-redef]
270
+ pass
260
271
 
261
272
 
262
273
  def load_ipython_extension(ipython: Any) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-color-math
3
- Version: 0.2.16
3
+ Version: 0.2.17
4
4
  Summary: A fast, local semantic LaTeX colorizer for Markdown, Jupyter, and LaTeX math equations.
5
5
  Author: Aditya
6
6
  License: MIT License
@@ -1,4 +1,4 @@
1
- color_math/__init__.py,sha256=9pI-ufyA7A1IodjkhdAsOR-tIr1DH_MSfOvQAokVl0Y,591
1
+ color_math/__init__.py,sha256=RKrr6cNZKmr81JSDhQBeqVBeuf1RL-OpWBQ0jqgfjQo,591
2
2
  color_math/__main__.py,sha256=lU6t3BklI-5H9EdprlceWLr0UcDmfXUu3Th0tjk2ANA,81
3
3
  color_math/adapters.py,sha256=glMvD8Bma_865jmOvIGGkCRxQLIEGjToFDOqJy_WeWA,12293
4
4
  color_math/colormath.default.json,sha256=KmQb7BV7sMMIqPxR4x6i9RwuXuUqkpyiy4yHw84GxPQ,2756
@@ -7,7 +7,7 @@ color_math/config.py,sha256=z8Op8UzZz4D0jMaAd8GGYwAbTwqR_2ZUG4Lb9f03Ii0,20982
7
7
  color_math/custom_definitions.py,sha256=IYJ_L51d1vyFf5frbJoFMIagKRcI7TiNzELfoewZyjk,2392
8
8
  color_math/gui.py,sha256=cBsgNToQdZ7mNQ9JA5_jEv7QbELc4NGtgXowTxZ-IWQ,21413
9
9
  color_math/io.py,sha256=iCWMY1ufPZzFCwuHTn_axNetek8PRXGNnrmz59CrlGw,1591
10
- color_math/ipython.py,sha256=q9oGpWGmZTSVp5lmn1Kq0LMQUlP1hNEfXWpoZRq_bLo,11891
10
+ color_math/ipython.py,sha256=WWEumx9va4aw4AHm_DcRCE7PLq6rtt50_XrnDqcAwJE,12313
11
11
  color_math/jupyter.py,sha256=CaCWNmtOPqUn0CVZdCie28M1324y0iU6ck2vxCvMn6w,3067
12
12
  color_math/main.py,sha256=Prk2pOGwqAlS9Yn62ACBnZv6XsQEco_NqrQYacU4kUo,34253
13
13
  color_math/mcp.py,sha256=M-JTnWC-xhJemIv2F0ZI4VBF5_MUmasid5B4PIIPgSo,1112
@@ -50,9 +50,9 @@ color_math/utils/latex_helpers.py,sha256=1cFj0zqv68mD-p0vej6yPrhwgqLfAWcIV1rX15F
50
50
  color_math/utils/spans.py,sha256=3Lq1_bN0s4vSYnS8Rz9tCHoFoJDY6Ff9CzawWWws3YE,3938
51
51
  python_color_math/__init__.py,sha256=Dj5YZXXjmNgbyhHKX2YQXvVggtB9UZy9zotLiV2j5So,329
52
52
  python_color_math/__main__.py,sha256=cqUM_fV0E6mtuHeBn2MjuozR2rlpev9AfXfcm2hSpi8,90
53
- python_color_math-0.2.16.dist-info/licenses/LICENSE,sha256=hveQNxqYFqK9Brs_ruH-8shF2D61hIVKYdCjiE-1wMY,1063
54
- python_color_math-0.2.16.dist-info/METADATA,sha256=CFUlkZUZAx7IzMUXc7nZjdbA_WXq9MBQBG-4U9tnNQA,14469
55
- python_color_math-0.2.16.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
56
- python_color_math-0.2.16.dist-info/entry_points.txt,sha256=ZgzGbO_D3csr693Fd-tVGhls6WzsZiOhCau-liSkE_M,130
57
- python_color_math-0.2.16.dist-info/top_level.txt,sha256=dkfmCdtILDAgX4wwDW5DKHh9YRLt9Mh2RU0gh1mBDDA,29
58
- python_color_math-0.2.16.dist-info/RECORD,,
53
+ python_color_math-0.2.17.dist-info/licenses/LICENSE,sha256=hveQNxqYFqK9Brs_ruH-8shF2D61hIVKYdCjiE-1wMY,1063
54
+ python_color_math-0.2.17.dist-info/METADATA,sha256=G3UNzZicxqfZ_FJGNTTSUbluoI8iFlZizsOKjijVNxo,14469
55
+ python_color_math-0.2.17.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
56
+ python_color_math-0.2.17.dist-info/entry_points.txt,sha256=ZgzGbO_D3csr693Fd-tVGhls6WzsZiOhCau-liSkE_M,130
57
+ python_color_math-0.2.17.dist-info/top_level.txt,sha256=dkfmCdtILDAgX4wwDW5DKHh9YRLt9Mh2RU0gh1mBDDA,29
58
+ python_color_math-0.2.17.dist-info/RECORD,,