approval-utilities 9.0.0__py3-none-any.whl → 11.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of approval-utilities might be problematic. Click here for more details.
- approval_utilities/list_utils.py +1 -1
- approval_utilities/utilities/multiline_string_utils.py +7 -2
- approval_utilities/utils.py +9 -0
- {approval_utilities-9.0.0.dist-info → approval_utilities-11.2.1.dist-info}/METADATA +2 -2
- {approval_utilities-9.0.0.dist-info → approval_utilities-11.2.1.dist-info}/RECORD +8 -8
- {approval_utilities-9.0.0.dist-info → approval_utilities-11.2.1.dist-info}/WHEEL +1 -1
- {approval_utilities-9.0.0.dist-info → approval_utilities-11.2.1.dist-info}/LICENSE +0 -0
- {approval_utilities-9.0.0.dist-info → approval_utilities-11.2.1.dist-info}/top_level.txt +0 -0
approval_utilities/list_utils.py
CHANGED
|
@@ -4,7 +4,7 @@ from typing import Callable, List, Optional
|
|
|
4
4
|
def format_list(alist: List[str], formatter: Optional[Callable], header: str) -> str:
|
|
5
5
|
if formatter is None:
|
|
6
6
|
formatter = FormatLineItem().print_item
|
|
7
|
-
text = header + "\n\n"
|
|
7
|
+
text = (header + "\n\n") if header else ""
|
|
8
8
|
for i in alist:
|
|
9
9
|
text += formatter(i) + "\n"
|
|
10
10
|
return text
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import textwrap
|
|
2
2
|
|
|
3
|
+
from approval_utilities.utilities.logger.simple_logger import SimpleLogger
|
|
4
|
+
|
|
3
5
|
|
|
4
6
|
def remove_indentation_from(text: str) -> str:
|
|
5
|
-
|
|
7
|
+
SimpleLogger.variable("text", text)
|
|
8
|
+
if not text:
|
|
9
|
+
return ""
|
|
10
|
+
cleaned = textwrap.dedent(text + "|")
|
|
6
11
|
if cleaned.startswith("\n"):
|
|
7
12
|
cleaned = cleaned[1:]
|
|
8
|
-
return cleaned
|
|
13
|
+
return cleaned[:-1]
|
approval_utilities/utils.py
CHANGED
|
@@ -67,3 +67,12 @@ def create_directory_if_needed(received_file: str) -> None:
|
|
|
67
67
|
directory = os.path.dirname(received_file)
|
|
68
68
|
if directory and not os.path.exists(directory):
|
|
69
69
|
os.makedirs(directory)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def print_grid(width, height, cell_print_func):
|
|
73
|
+
result = ""
|
|
74
|
+
for y in range(height):
|
|
75
|
+
for x in range(width):
|
|
76
|
+
result += cell_print_func(x, y)
|
|
77
|
+
result += "\n"
|
|
78
|
+
return result
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
|
-
Name:
|
|
3
|
-
Version:
|
|
2
|
+
Name: approval_utilities
|
|
3
|
+
Version: 11.2.1
|
|
4
4
|
Summary: Utilities for your production code that work well with approvaltests
|
|
5
5
|
Home-page: https://github.com/approvals/ApprovalTests.Python
|
|
6
6
|
Author: ApprovalTests Contributors
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
approval_utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
approval_utilities/list_utils.py,sha256=
|
|
3
|
-
approval_utilities/utils.py,sha256=
|
|
2
|
+
approval_utilities/list_utils.py,sha256=7OT3YkysNmq3ZD7shzirQ8S9Yqf2rS7ckcMNKbC1Jf0,551
|
|
3
|
+
approval_utilities/utils.py,sha256=1M9HHAGfzFEajZPJj1-hXQaolTU4v42UjfylZd_xxSs,2127
|
|
4
4
|
approval_utilities/approvaltests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
approval_utilities/approvaltests/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
approval_utilities/approvaltests/core/executable_command.py,sha256=LFLD36fAe1ek8YlKdZbj8j3dfJ8InFBnIGS8OzaDxDQ,428
|
|
@@ -11,7 +11,7 @@ approval_utilities/utilities/clipboard_utilities.py,sha256=MPwS_OoVZkjDAOv1IoM_i
|
|
|
11
11
|
approval_utilities/utilities/deprecated.py,sha256=_x0zM73WaXvqAiWFTM08m-jSdEEtEEbEHUIFCKzzjf8,822
|
|
12
12
|
approval_utilities/utilities/map_reduce.py,sha256=tkW3MnI3kkHnyMGhULKi-e8jStoKILURrwusRd7ZKuw,191
|
|
13
13
|
approval_utilities/utilities/markdown_table.py,sha256=SNCJKZJ976zNzkYEgCgEMyhGJ3Yox4CyVSBBIaXKBnM,1602
|
|
14
|
-
approval_utilities/utilities/multiline_string_utils.py,sha256=
|
|
14
|
+
approval_utilities/utilities/multiline_string_utils.py,sha256=RzjyPZyj9gc6CJy-FwQNkKDh2uCOI168_R-72-J471Q,345
|
|
15
15
|
approval_utilities/utilities/os_utilities.py,sha256=UuvmHM1SXf9O-M7hDBfxrNvHo9C74NDSOY9n22bInPY,150
|
|
16
16
|
approval_utilities/utilities/stack_frame_utilities.py,sha256=SawZgr7B0WanlDbURB_oHExhRpA8i9uQHduJBGdQm0U,311
|
|
17
17
|
approval_utilities/utilities/string_wrapper.py,sha256=ceV763aiaE-o1WwQI21jEiFBgHaxsXjB1Y9PzQgwwwg,230
|
|
@@ -27,8 +27,8 @@ approval_utilities/utilities/logger/simple_logger.py,sha256=-MQ1sii7u5VYFO_Zle51
|
|
|
27
27
|
approval_utilities/utilities/persistence/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
28
|
approval_utilities/utilities/persistence/loader.py,sha256=0kLYZRhJh_SX4j6Fxf_9jN64WcgcgMoFTKkUd10S9vM,218
|
|
29
29
|
approval_utilities/utilities/persistence/saver.py,sha256=_xZxyeNkzAweicun69mgBYSakyeObJxesy7aVAIdWl0,223
|
|
30
|
-
approval_utilities-
|
|
31
|
-
approval_utilities-
|
|
32
|
-
approval_utilities-
|
|
33
|
-
approval_utilities-
|
|
34
|
-
approval_utilities-
|
|
30
|
+
approval_utilities-11.2.1.dist-info/LICENSE,sha256=c7p036pSC0mkAbXSFFmoUjoUbzt1GKgz7qXvqFEwv2g,10273
|
|
31
|
+
approval_utilities-11.2.1.dist-info/METADATA,sha256=2vbVjO4riFNQq_3NU15UBiNfOKWQFnPhdGmRbJ9Ffb8,1005
|
|
32
|
+
approval_utilities-11.2.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
33
|
+
approval_utilities-11.2.1.dist-info/top_level.txt,sha256=9uDtIZHmdLyDNIBh-jNfEM1dA6lBDmo5ftR376zOiv4,19
|
|
34
|
+
approval_utilities-11.2.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|