Skip to content

Commit 97bc4d8

Browse files
authored
Merge branch 'toon-format:main' into main
2 parents fc68878 + 9c4f0c0 commit 97bc4d8

5 files changed

Lines changed: 17 additions & 7 deletions

File tree

LICENSE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
MIT License
22

33
Copyright (c) 2025-PRESENT Johann Schopplich
4+
Copyright (c) 2025-PRESENT Xavi Vinaixa
5+
Copyright (c) 2025-PRESENT David Pirogov
6+
Copyright (c) 2025-PRESENT Justar
47

58
Permission is hereby granted, free of charge, to any person obtaining a copy
69
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,13 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
160160
- [🐛 Issues](https://github.com/toon-format/toon-python/issues) - Bug reports and features
161161
- [🤝 Contributing](CONTRIBUTING.md) - Contribution guidelines
162162

163+
## Contributors
164+
165+
- [Xavi Vinaixa](https://github.com/xaviviro)
166+
- [David Pirogov](https://github.com/davidpirogov)
167+
- [Justar](https://github.com/Justar96)
168+
- [Johann Schopplich](https://github.com/johannschopplich)
169+
163170
## License
164171

165-
MIT License - see [LICENSE](LICENSE)
172+
MIT License see [LICENSE](LICENSE) for details

src/toon_format/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
the TOON implementation. Centralizes magic values for maintainability.
77
"""
88

9-
from typing import TYPE_CHECKING
9+
from typing import TYPE_CHECKING, Dict
1010

1111
if TYPE_CHECKING:
1212
from .types import Delimiter
@@ -45,7 +45,7 @@
4545
# endregion
4646

4747
# region Delimiters
48-
DELIMITERS: dict[str, "Delimiter"] = {
48+
DELIMITERS: Dict[str, "Delimiter"] = {
4949
"comma": COMMA,
5050
"tab": TAB,
5151
"pipe": PIPE,

src/toon_format/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
import functools
2727
import json
28-
from typing import Any
28+
from typing import Any, Dict
2929

3030
# Import encode from parent package (defined in __init__.py before this module is imported)
3131
# __init__.py defines encode() before importing utils, so this is safe
@@ -91,7 +91,7 @@ def count_tokens(text: str, encoding: str = "o200k_base") -> int:
9191
return len(enc.encode(text))
9292

9393

94-
def estimate_savings(data: Any, encoding: str = "o200k_base") -> dict[str, Any]:
94+
def estimate_savings(data: Any, encoding: str = "o200k_base") -> Dict[str, Any]:
9595
"""Compare token counts between JSON and TOON formats.
9696
9797
Args:

src/toon_format/writer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
indent string caching for performance.
77
"""
88

9-
from typing import List
9+
from typing import Dict, List
1010

1111
from .types import Depth
1212

@@ -24,7 +24,7 @@ def __init__(self, indent_size: int) -> None:
2424
# Ensure nested structures remain distinguishable even for indent=0
2525
normalized_indent = indent_size if indent_size > 0 else 1
2626
self._indentation_string = " " * normalized_indent
27-
self._indent_cache: dict[int, str] = {0: ""}
27+
self._indent_cache: Dict[int, str] = {0: ""}
2828
self._indent_size = indent_size
2929

3030
def push(self, depth: Depth, content: str) -> None:

0 commit comments

Comments
 (0)