Skip to content

Commit 3edc3e1

Browse files
committed
Automatic backup 2025-09-05
1 parent 5ca3556 commit 3edc3e1

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

rich_tables/diff.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ def diff(before: str, after: str) -> str:
123123

124124

125125
@diff.register
126-
def _(before: Any, after: Any) -> Any:
126+
def _(before: Any, after: Any) -> int:
127127
return diff(diff_serialize(before), diff_serialize(after))
128128

129129

130130
@diff.register
131-
def _(before: HashableList[Any], after: HashableList[Any]) -> Any:
131+
def _(before: HashableList[Any], after: HashableList[Any]) -> int:
132132
return list(starmap(diff, zip_longest(before, after)))
133133

134134

@@ -148,8 +148,8 @@ def _(before: HashableDict, after: HashableDict) -> dict[str, str]:
148148

149149

150150
@diff.register
151-
def _(before: HashableDict, after: None) -> dict[str, str]:
152-
return diff(before, HashableDict())
151+
def _(before: HashableDict[str, str], after: None) -> dict[str, str]:
152+
return diff(before, HashableDict[str, str]())
153153

154154

155155
@diff.register

rich_tables/table.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import argparse
55
import json
66
import sys
7-
import tempfile
87
from contextlib import contextmanager
98
from functools import singledispatch
109
from pathlib import Path

rich_tables/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from rich.console import Console, RenderableType, RenderResult
2323
from rich.errors import MarkupError
2424
from rich.markdown import Markdown
25+
2526
# from rich.style
2627
from rich.panel import Panel
2728
from rich.syntax import Syntax
@@ -129,8 +130,8 @@ def format_string(text: str) -> str:
129130
return text
130131

131132

132-
def wrap(text: Any, tag: str) -> str:
133-
return f"[{tag}]{format_string(str(text))}[/]"
133+
def wrap(text: str, tag: str) -> str:
134+
return f"[{tag}]{format_string(str(text))}[/{tag}]"
134135

135136

136137
def duration2human(duration: SupportsFloat) -> str:

0 commit comments

Comments
 (0)