mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-07 03:07:46 +08:00
pre-commit autoupdate: pyupgrade v2.34.0 -> v2.37.0 (#6245)
* pre-commit autoupdate: pyupgrade v2.34.0 -> v2.37.0 * pre-commit run --all-files
This commit is contained in:
@ -10,7 +10,7 @@ python binary_search_tree_recursive.py
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from typing import Iterator
|
||||
from collections.abc import Iterator
|
||||
|
||||
|
||||
class Node:
|
||||
|
@ -2,8 +2,9 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from collections import deque
|
||||
from collections.abc import Sequence
|
||||
from dataclasses import dataclass
|
||||
from typing import Any, Sequence
|
||||
from typing import Any
|
||||
|
||||
|
||||
@dataclass
|
||||
|
@ -37,7 +37,8 @@ https://www.geeksforgeeks.org/segment-tree-efficient-implementation/
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Callable, Generic, TypeVar
|
||||
from collections.abc import Callable
|
||||
from typing import Any, Generic, TypeVar
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
|
@ -4,7 +4,7 @@ flake8 : passed
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Iterator
|
||||
from collections.abc import Iterator
|
||||
|
||||
|
||||
class RedBlackTree:
|
||||
|
@ -1,6 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Iterable
|
||||
from collections.abc import Iterable
|
||||
|
||||
|
||||
class Heap:
|
||||
|
@ -3,7 +3,8 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import random
|
||||
from typing import Any, Generic, Iterable, TypeVar
|
||||
from collections.abc import Iterable
|
||||
from typing import Any, Generic, TypeVar
|
||||
|
||||
T = TypeVar("T", bound=bool)
|
||||
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Generic, Iterable, Iterator, TypeVar
|
||||
from collections.abc import Iterable, Iterator
|
||||
from typing import Any, Generic, TypeVar
|
||||
|
||||
T = TypeVar("T", bound=bool)
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Iterator
|
||||
from collections.abc import Iterator
|
||||
from typing import Any
|
||||
|
||||
|
||||
class Node:
|
||||
|
@ -3,8 +3,9 @@ Implementation of double ended queue.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Iterable
|
||||
from dataclasses import dataclass
|
||||
from typing import Any, Iterable
|
||||
from typing import Any
|
||||
|
||||
|
||||
class Deque:
|
||||
|
@ -1,7 +1,8 @@
|
||||
""" A Queue using a linked list like structure """
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Iterator
|
||||
from collections.abc import Iterator
|
||||
from typing import Any
|
||||
|
||||
|
||||
class Node:
|
||||
|
Reference in New Issue
Block a user