mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 10:31:29 +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:
@ -12,7 +12,7 @@ from __future__ import annotations
|
||||
solution = []
|
||||
|
||||
|
||||
def isSafe(board: list[list[int]], row: int, column: int) -> bool:
|
||||
def is_safe(board: list[list[int]], row: int, column: int) -> bool:
|
||||
"""
|
||||
This function returns a boolean value True if it is safe to place a queen there
|
||||
considering the current state of the board.
|
||||
@ -63,7 +63,7 @@ def solve(board: list[list[int]], row: int) -> bool:
|
||||
If all the combinations for that particular branch are successful the board is
|
||||
reinitialized for the next possible combination.
|
||||
"""
|
||||
if isSafe(board, row, i):
|
||||
if is_safe(board, row, i):
|
||||
board[row][i] = 1
|
||||
solve(board, row + 1)
|
||||
board[row][i] = 0
|
||||
|
Reference in New Issue
Block a user