mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
Add pep8-naming to pre-commit hooks and fixes incorrect naming conventions (#7062)
* ci(pre-commit): Add pep8-naming to `pre-commit` hooks (#7038) * refactor: Fix naming conventions (#7038) * Update arithmetic_analysis/lu_decomposition.py Co-authored-by: Christian Clauss <cclauss@me.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * refactor(lu_decomposition): Replace `NDArray` with `ArrayLike` (#7038) * chore: Fix naming conventions in doctests (#7038) * fix: Temporarily disable project euler problem 104 (#7069) * chore: Fix naming conventions in doctests (#7038) Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -15,15 +15,15 @@ include it once in your sum.
|
||||
import itertools
|
||||
|
||||
|
||||
def isCombinationValid(combination):
|
||||
def is_combination_valid(combination):
|
||||
"""
|
||||
Checks if a combination (a tuple of 9 digits)
|
||||
is a valid product equation.
|
||||
|
||||
>>> isCombinationValid(('3', '9', '1', '8', '6', '7', '2', '5', '4'))
|
||||
>>> is_combination_valid(('3', '9', '1', '8', '6', '7', '2', '5', '4'))
|
||||
True
|
||||
|
||||
>>> isCombinationValid(('1', '2', '3', '4', '5', '6', '7', '8', '9'))
|
||||
>>> is_combination_valid(('1', '2', '3', '4', '5', '6', '7', '8', '9'))
|
||||
False
|
||||
|
||||
"""
|
||||
@ -49,7 +49,7 @@ def solution():
|
||||
{
|
||||
int("".join(pandigital[5:9]))
|
||||
for pandigital in itertools.permutations("123456789")
|
||||
if isCombinationValid(pandigital)
|
||||
if is_combination_valid(pandigital)
|
||||
}
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user