|
72 | 72 | import textwrap |
73 | 73 | import typing |
74 | 74 | import warnings |
| 75 | +from datetime import date |
75 | 76 | from pprint import pformat |
76 | 77 | from typing import Any, Callable, Dict, Generator, Iterable, List, Optional, Sequence, Tuple, Union |
77 | 78 |
|
78 | 79 | # 3rd party |
79 | 80 | import deprecation # type: ignore |
| 81 | +from packaging import version |
80 | 82 |
|
81 | 83 | # this package |
82 | 84 | import domdf_python_tools.words |
83 | 85 | from domdf_python_tools import __version__ |
84 | 86 | from domdf_python_tools.terminal_colours import Colour, Fore |
85 | 87 | from domdf_python_tools.typing import HasHead, String |
86 | 88 |
|
87 | | -if typing.TYPE_CHECKING or domdf_python_tools.__docs: |
| 89 | +if typing.TYPE_CHECKING or domdf_python_tools.__docs: # pragma: no cover |
88 | 90 | # 3rd party |
89 | 91 | from pandas import DataFrame, Series # type: ignore |
90 | 92 |
|
|
110 | 112 | "convert_indents", |
111 | 113 | "etc", |
112 | 114 | "head", |
| 115 | + "coloured_diff", |
113 | 116 | "deprecated", |
114 | 117 | ] |
115 | 118 |
|
@@ -270,7 +273,7 @@ def str2tuple(input_string: str, sep: str = ',') -> Tuple[int, ...]: |
270 | 273 | return tuple(int(x) for x in input_string.split(sep)) |
271 | 274 |
|
272 | 275 |
|
273 | | -def strtobool(val: Union[str, bool]) -> bool: |
| 276 | +def strtobool(val: Union[str, int]) -> bool: |
274 | 277 | """ |
275 | 278 | Convert a string representation of truth to :py:obj:`True` or :py:obj:`False`. |
276 | 279 |
|
@@ -557,13 +560,6 @@ def coloured_diff( |
557 | 560 | return str(buf) |
558 | 561 |
|
559 | 562 |
|
560 | | -# stdlib |
561 | | -from datetime import date |
562 | | - |
563 | | -# 3rd party |
564 | | -from packaging import version |
565 | | - |
566 | | - |
567 | 563 | def deprecated( |
568 | 564 | deprecated_in: Optional[str] = None, |
569 | 565 | removed_in: Optional[str] = None, |
|
0 commit comments