mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
Enable ruff PLR5501 rule (#11332)
* Enable ruff PLR5501 rule * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -28,9 +28,8 @@ def is_valid(
|
||||
if vertical:
|
||||
if row + i >= len(puzzle) or puzzle[row + i][col] != "":
|
||||
return False
|
||||
else:
|
||||
if col + i >= len(puzzle[0]) or puzzle[row][col + i] != "":
|
||||
return False
|
||||
elif col + i >= len(puzzle[0]) or puzzle[row][col + i] != "":
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user