mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
[pre-commit.ci] pre-commit autoupdate (#12398)
updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.10 → v0.5.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.10...v0.5.0) - [github.com/pre-commit/mirrors-mypy: v1.10.0 → v1.10.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.10.0...v1.10.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
![66853113+pre-commit-ci[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
GitHub

parent
f3f32ae3ca
commit
fc33c50593
@ -17,7 +17,7 @@ from __future__ import annotations
|
||||
from collections.abc import Generator
|
||||
|
||||
|
||||
def collatz_sequence(n: int) -> Generator[int, None, None]:
|
||||
def collatz_sequence(n: int) -> Generator[int]:
|
||||
"""
|
||||
Generate the Collatz sequence starting at n.
|
||||
>>> tuple(collatz_sequence(2.1))
|
||||
|
@ -2,7 +2,7 @@ import math
|
||||
from collections.abc import Generator
|
||||
|
||||
|
||||
def slow_primes(max_n: int) -> Generator[int, None, None]:
|
||||
def slow_primes(max_n: int) -> Generator[int]:
|
||||
"""
|
||||
Return a list of all primes numbers up to max.
|
||||
>>> list(slow_primes(0))
|
||||
@ -29,7 +29,7 @@ def slow_primes(max_n: int) -> Generator[int, None, None]:
|
||||
yield i
|
||||
|
||||
|
||||
def primes(max_n: int) -> Generator[int, None, None]:
|
||||
def primes(max_n: int) -> Generator[int]:
|
||||
"""
|
||||
Return a list of all primes numbers up to max.
|
||||
>>> list(primes(0))
|
||||
@ -58,7 +58,7 @@ def primes(max_n: int) -> Generator[int, None, None]:
|
||||
yield i
|
||||
|
||||
|
||||
def fast_primes(max_n: int) -> Generator[int, None, None]:
|
||||
def fast_primes(max_n: int) -> Generator[int]:
|
||||
"""
|
||||
Return a list of all primes numbers up to max.
|
||||
>>> list(fast_primes(0))
|
||||
|
@ -6,7 +6,7 @@ Find the volume of various shapes.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from math import pi, pow
|
||||
from math import pi, pow # noqa: A004
|
||||
|
||||
|
||||
def vol_cube(side_length: float) -> float:
|
||||
|
Reference in New Issue
Block a user