Skip to content

Commit 3c6cf98

Browse files
committed
Move String into utils.
1 parent 327c4a6 commit 3c6cf98

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

domdf_python_tools/stringlist.py

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,13 @@
2727
from contextlib import contextmanager
2828
from typing import Any, Iterable, Iterator, List, Tuple, Union, cast, overload
2929

30-
# 3rd party
31-
from typing_extensions import Protocol, runtime_checkable
32-
3330
# this package
34-
from domdf_python_tools.utils import convert_indents
35-
36-
__all__ = ["String", "Indent", "StringList"]
31+
from domdf_python_tools.utils import String, convert_indents
3732

33+
# Will be removed in 1.0
34+
String = String
3835

39-
@runtime_checkable
40-
class String(Protocol):
41-
"""
42-
Protocol for classes that implement ``__str__``.
43-
"""
44-
45-
def __str__(self) -> str:
46-
... # pragma: no cover
36+
__all__ = ["Indent", "StringList"]
4737

4838

4939
class Indent:

domdf_python_tools/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
"etc",
9393
"head",
9494
"HasHead",
95+
"String",
9596
]
9697

9798
#: The current major python version.

0 commit comments

Comments
 (0)