Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit faa9117

Browse files
committed
Update 2023.08.1 (#103)
# Conflicts: # poetry.lock # pyproject.toml # src/atm/func.py
1 parent f92dfd0 commit faa9117

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

src/atm/func.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ def withdraw_rev(target: int,
7979
limited with ``limit`` argument).
8080
8181
Usage:
82-
#
83-
# >>> assert withdraw_rev(0) == []
84-
# >>> assert withdraw_rev(14) == [(10, 1), (2, 2)]
85-
# >>> assert withdraw_rev(17) == [(9, 1), (4, 2)]
82+
83+
>>> assert withdraw_rev(0) == []
84+
>>> assert withdraw_rev(14) == [(10, 1), (2, 2)]
85+
>>> assert withdraw_rev(17) == [(9, 1), (4, 2)]
8686
8787
"""
8888

@@ -103,8 +103,8 @@ def get_total(values: Iterable[Tuple[int, int]]) -> int:
103103
104104
Usage:
105105
106-
>>> assert get_total([(1, 50), (1, 500), (2, 2000), (2, 10000)]) == 24550
107-
>>> assert get_total([(1, 10000), (1, 5000), (1, 2000), (1, 500)]) == 17500
106+
>>> assert get_total([(1, 50), (1, 500), (2, 2000), (2, 10000)]) == 24500
107+
>>> assert get_total([(1, 500), (1, 2000), (1, 5000), (1, 10000)]) == 17545
108108
>>> assert get_total([(1, 2000)]) == 2000
109109
110110
"""

src/sequences/func.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ def is_palindrome(origin: Union[str, int], /) -> bool:
1313
"""
1414
Return a palindrome check result
1515
16+
:param origin: value to test
17+
:type origin: str | int
18+
19+
:return: return a palindrome check result
20+
:rtype: bool
21+
1622
This function implements two pointers method. The left pointer is
1723
initialized at the beginning of an origin string, and the right one -
1824
at the end. The check cycle compares characters at left and right
@@ -21,12 +27,6 @@ def is_palindrome(origin: Union[str, int], /) -> bool:
2127
returns True. Punctuation, word boundaries and capitalization are
2228
ignored.
2329
24-
:param origin: value to test
25-
:type origin: str | int
26-
27-
:return: return a palindrome check result
28-
:rtype: bool
29-
3030
Usage:
3131
3232
>>> assert is_palindrome("aba") is True
@@ -150,18 +150,18 @@ def are_parentheses_balanced(origin: str, /) -> bool:
150150
"""
151151
Return a validation result for a given parentheses sequence
152152
153-
Validation rules:
154-
155-
- each opening parentheses must be closed by the same type parentheses
156-
- open parentheses must be closed in the correct order
157-
- any non-parentheses characters are to be ignored
158-
159153
:param origin: a parentheses sequence to validate
160154
:type origin: str
161155
162156
:return: a validation result
163157
:rtype: bool
164158
159+
Validation rules:
160+
161+
- each opening parentheses must be closed by the same type parentheses
162+
- open parentheses must be closed in the correct order
163+
- any non-parentheses characters are to be ignored
164+
165165
Usage:
166166
167167
>>> assert are_parentheses_balanced("({[]})") is True

0 commit comments

Comments
 (0)