Skip to content

Commit 29419d0

Browse files
authored
Merge pull request #106 from 0Hughman0/0.2.x
0.2.2
2 parents 51dec83 + 28ac49b commit 29419d0

File tree

5 files changed

+10
-2784
lines changed

5 files changed

+10
-2784
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ coverage.xml
6868
dist/
6969
pip-wheel-metadata/
7070
cassini.egg-info/
71+
poetry.lock
7172

7273
# Jupyter Stuff
7374
.ipynb_checkpoints*

cassini/core.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import time
88
from pathlib import Path
99
from collections import defaultdict
10+
from abc import ABC
1011

1112
from typing import (
1213
Any,
@@ -21,7 +22,7 @@
2122
Optional,
2223
cast,
2324
)
24-
from typing_extensions import Protocol, Self, deprecated
25+
from typing_extensions import Self, deprecated
2526

2627
import pandas as pd
2728

@@ -144,7 +145,7 @@ def keys(self) -> KeysView[str]:
144145
CachedType = HighlightsType
145146

146147

147-
class TierBase(Protocol):
148+
class TierBase(ABC):
148149
"""
149150
Base class for creating Tiers
150151

cassini/magics.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ def capture_display(msg):
3939
publish_display_data({"text/markdown": header})
4040

4141
result = shell.run_cell(cell).result
42-
outputs.append(
43-
dict(zip(("data", "metadata"), shell.display_formatter.format(result)))
44-
)
42+
43+
if shell.display_formatter:
44+
outputs.append(
45+
dict(zip(("data", "metadata"), shell.display_formatter.format(result)))
46+
)
4547

4648
if annotation:
4749
publish_display_data({"text/markdown": annotation})

0 commit comments

Comments
 (0)