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:
Christian Clauss
2022-07-11 10:19:52 +02:00
committed by GitHub
parent 2d5dd6f132
commit b75a7c77f8
41 changed files with 56 additions and 41 deletions

View File

@@ -11,8 +11,8 @@ References:
- https://en.wikipedia.org/wiki/Prime_number
"""
import math
from collections.abc import Iterator
from itertools import takewhile
from typing import Iterator
def is_prime(number: int) -> bool:

View File

@@ -23,7 +23,7 @@ The 12th term, F12, is the first term to contain three digits.
What is the index of the first term in the Fibonacci sequence to contain 1000
digits?
"""
from typing import Generator
from collections.abc import Generator
def fibonacci_generator() -> Generator[int, None, None]:

View File

@@ -43,7 +43,8 @@ Find the sum of FITs for the BOPs.
"""
from __future__ import annotations
from typing import Callable, Union
from collections.abc import Callable
from typing import Union
Matrix = list[list[Union[float, int]]]

View File

@@ -30,7 +30,7 @@ Solution:
from __future__ import annotations
import os
from typing import Mapping
from collections.abc import Mapping
EdgeT = tuple[int, int]

View File

@@ -39,7 +39,7 @@ So it could be simplified as,
"""
from __future__ import annotations
from typing import Generator
from collections.abc import Generator
def sieve() -> Generator[int, None, None]: