Pyupgrade to Python 3.9 (#4718)

* Pyupgrade to Python 3.9

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
Christian Clauss
2021-09-07 13:37:03 +02:00
committed by GitHub
parent 5d5831bdd0
commit cecf43d648
142 changed files with 523 additions and 530 deletions

View File

@ -75,14 +75,14 @@ Applying this two formulas we can check if a queen in some position is being att
for another one or vice versa.
"""
from typing import List
from __future__ import annotations
def depth_first_search(
possible_board: List[int],
diagonal_right_collisions: List[int],
diagonal_left_collisions: List[int],
boards: List[List[str]],
possible_board: list[int],
diagonal_right_collisions: list[int],
diagonal_left_collisions: list[int],
boards: list[list[str]],
n: int,
) -> None:
"""
@ -139,7 +139,7 @@ def depth_first_search(
def n_queens_solution(n: int) -> None:
boards: List[List[str]] = []
boards: list[list[str]] = []
depth_first_search([], [], [], boards, n)
# Print all the boards