mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
chore: Fix ruff build failures (#14347)
This commit is contained in:
@@ -47,7 +47,6 @@ from collections.abc import Callable
|
||||
from math import log
|
||||
from os import name, system
|
||||
from random import gauss, seed
|
||||
from typing import TypeVar
|
||||
|
||||
|
||||
# Make a training dataset drawn from a gaussian distribution
|
||||
@@ -249,10 +248,7 @@ def accuracy(actual_y: list, predicted_y: list) -> float:
|
||||
return (correct / len(actual_y)) * 100
|
||||
|
||||
|
||||
num = TypeVar("num")
|
||||
|
||||
|
||||
def valid_input(
|
||||
def valid_input[num](
|
||||
input_type: Callable[[object], num], # Usually float or int
|
||||
input_msg: str,
|
||||
err_msg: str,
|
||||
|
||||
Reference in New Issue
Block a user