Skip to content

Commit 2176078

Browse files
committed
add: two docstrings
1 parent 15879f8 commit 2176078

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gendiff/gendiff.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def get_list_of_dict_with_sign(data1, data2) -> list:
3434

3535
def sort_list(items: list):
3636
def sort_by_rule(item: dict) -> str:
37+
"""The sign is changed to correctly sort items with the same key."""
3738
if item['sign'] == '+':
3839
sign = '-'
3940
elif item['sign'] == '-':
@@ -46,6 +47,10 @@ def sort_by_rule(item: dict) -> str:
4647

4748

4849
def make_str_from_list(items: list) -> str:
50+
"""
51+
Type checking for the output of strings without quotes,
52+
and for the correct output of True, False in the form of true, false.
53+
"""
4954
list_of_str = ['{']
5055
for item in items:
5156
sign = item['sign']

0 commit comments

Comments
 (0)