Skip to content

Commit b5618a4

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent f2c91bf commit b5618a4

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

combinatorics/combinations.py

+14-14
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def validate_elements_count(
55
total_elements_count: int, selected_elements_count: int
66
) -> None:
77
"""
8-
Validate that the number of elements are positive and
8+
Validate that the number of elements are positive and
99
the total is greater than or equal to selected.
1010
Examples:
1111
>>> validate_elements_count(6, 3)
@@ -24,7 +24,7 @@ def combinations_iterative(
2424
total_elements_count: int, selected_elements_count: int
2525
) -> int:
2626
"""
27-
Returns the number of combinations that can be made
27+
Returns the number of combinations that can be made
2828
from a total set of elements.
2929
3030
Examples:
@@ -41,8 +41,8 @@ def combinations_iterative(
4141
>>> combinations_iterative(-4, -5)
4242
Traceback (most recent call last):
4343
...
44-
ValueError: Please enter positive integers for total_elements_count
45-
and selected_elements_count where
44+
ValueError: Please enter positive integers for total_elements_count
45+
and selected_elements_count where
4646
total_elements_count >= selected_elements_count
4747
"""
4848
validate_elements_count(total_elements_count, selected_elements_count)
@@ -101,8 +101,8 @@ def combinations_formula(
101101
>>> combinations_formula(-4, -5)
102102
Traceback (most recent call last):
103103
...
104-
ValueError: Please enter positive integers for
105-
total_elements_count and selected_elements_count
104+
ValueError: Please enter positive integers for
105+
total_elements_count and selected_elements_count
106106
where total_elements_count >= selected_elements_count
107107
"""
108108
validate_elements_count(total_elements_count, selected_elements_count)
@@ -133,8 +133,8 @@ def combinations_with_repetitions(
133133
>>> combinations_with_repetitions(-4, -5)
134134
Traceback (most recent call last):
135135
...
136-
ValueError: Please enter positive integers for
137-
total_elements_count and selected_elements_count
136+
ValueError: Please enter positive integers for
137+
total_elements_count and selected_elements_count
138138
where total_elements_count >= selected_elements_count
139139
"""
140140
validate_elements_count(total_elements_count, selected_elements_count)
@@ -148,7 +148,7 @@ def combinations_with_repetitions(
148148

149149
def permutations(total_elements_count: int, selected_elements_count: int) -> int:
150150
"""
151-
Calculate the number of permutations of selecting k elements
151+
Calculate the number of permutations of selecting k elements
152152
from n elements.
153153
154154
Examples:
@@ -165,8 +165,8 @@ def permutations(total_elements_count: int, selected_elements_count: int) -> int
165165
>>> permutations(-4, -5)
166166
Traceback (most recent call last):
167167
...
168-
ValueError: Please enter positive integers for
169-
total_elements_count and selected_elements_count
168+
ValueError: Please enter positive integers for
169+
total_elements_count and selected_elements_count
170170
where total_elements_count >= selected_elements_count
171171
"""
172172
validate_elements_count(total_elements_count, selected_elements_count)
@@ -176,7 +176,7 @@ def permutations(total_elements_count: int, selected_elements_count: int) -> int
176176

177177
def possible_selections(total_elements_count: int, selected_elements_count: int) -> int:
178178
"""
179-
Calculate the number of possible selections of k items
179+
Calculate the number of possible selections of k items
180180
from n available items, with replacement.
181181
182182
Examples:
@@ -193,8 +193,8 @@ def possible_selections(total_elements_count: int, selected_elements_count: int)
193193
>>> possible_selections(-4, -5)
194194
Traceback (most recent call last):
195195
...
196-
ValueError: Please enter positive integers for
197-
total_elements_count and selected_elements_count
196+
ValueError: Please enter positive integers for
197+
total_elements_count and selected_elements_count
198198
where total_elements_count >= selected_elements_count
199199
"""
200200
validate_elements_count(total_elements_count, selected_elements_count)

combinatorics/derangements.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
def derangement(elements_count: int) -> int:
99
"""
10-
Returns the number of different combinations of selected_elements_count
11-
length which can be made from total_elements_count values,
10+
Returns the number of different combinations of selected_elements_count
11+
length which can be made from total_elements_count values,
1212
where total_elements_count >= selected_elements_count.
1313
1414
Examples:

combinatorics/stirling_second_kind.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ def validate_elements_count(
2222

2323
def stirling_second(total_elements_count: int, selected_elements_count: int) -> None:
2424
"""
25-
Returns the number of different combinations of
26-
selected_elements_count length which can be made from
27-
total_elements_count values, where
25+
Returns the number of different combinations of
26+
selected_elements_count length which can be made from
27+
total_elements_count values, where
2828
total_elements_count >= selected_elements_count.
2929
3030
Examples:

0 commit comments

Comments
 (0)