diff --git a/benchmarks/cli.py b/benchmarks/cli.py index 51fa49a..0e8856f 100644 --- a/benchmarks/cli.py +++ b/benchmarks/cli.py @@ -25,7 +25,7 @@ logger = logging.getLogger(__name__) def cmd_list(experiments: Dict[str, ExperimentBuilder[Experiment]], _): - print(f'Available experiments are:') + print('Available experiments are:') for experiment in experiments.keys(): print(f' - {experiment}') @@ -42,7 +42,7 @@ def cmd_run(experiments: Dict[str, ExperimentBuilder[Experiment]], args): def cmd_describe(args): if not args.type: - print(f'Available experiment types are:') + print('Available experiment types are:') for experiment in config_parser.experiment_types.keys(): print(f' - {experiment}') return @@ -79,7 +79,7 @@ def _parse_config(config: Path) -> Dict[str, ExperimentBuilder[Experiment]]: try: return config_parser.parse(infile) except ValidationError as e: - print(f'There were errors parsing the config file.') + print('There were errors parsing the config file.') for error in e.errors(): print(f' - {error["loc"]}: {error["msg"]} {error["input"]}') sys.exit(-1) diff --git a/benchmarks/conftest.py b/benchmarks/conftest.py index e786c17..c928b36 100644 --- a/benchmarks/conftest.py +++ b/benchmarks/conftest.py @@ -1,2 +1,4 @@ +# ruff: noqa: F403 + from benchmarks.deluge.tests.fixtures import * from benchmarks.core.tests.fixtures import * diff --git a/benchmarks/core/config.py b/benchmarks/core/config.py index b5e8f1e..deadef3 100644 --- a/benchmarks/core/config.py +++ b/benchmarks/core/config.py @@ -2,7 +2,7 @@ import os from abc import abstractmethod from io import TextIOBase -from typing import Type, Dict, TextIO, Callable, cast +from typing import Type, Dict, TextIO import yaml from typing_extensions import Generic, overload diff --git a/benchmarks/core/experiments/experiments.py b/benchmarks/core/experiments/experiments.py index bd46eeb..b0edc0c 100644 --- a/benchmarks/core/experiments/experiments.py +++ b/benchmarks/core/experiments/experiments.py @@ -4,11 +4,10 @@ import logging from abc import ABC, abstractmethod from collections.abc import Iterable from time import time, sleep -from typing import Optional, List +from typing import List from typing_extensions import Generic, TypeVar -from benchmarks.core.utils import await_predicate logger = logging.getLogger(__name__) diff --git a/benchmarks/core/logging.py b/benchmarks/core/logging.py index df23af0..aa8d7fe 100644 --- a/benchmarks/core/logging.py +++ b/benchmarks/core/logging.py @@ -5,7 +5,7 @@ from abc import ABC, abstractmethod from csv import DictWriter from enum import Enum from json import JSONDecodeError -from typing import Type, TextIO, Iterable, Callable, Dict, Tuple, cast, Any +from typing import Type, TextIO, Iterable, Callable, Dict, Tuple, cast from pydantic import ValidationError, computed_field, Field diff --git a/benchmarks/deluge/tests/test_deluge_node.py b/benchmarks/deluge/tests/test_deluge_node.py index 63cac35..d44419a 100644 --- a/benchmarks/deluge/tests/test_deluge_node.py +++ b/benchmarks/deluge/tests/test_deluge_node.py @@ -15,7 +15,7 @@ def assert_is_seed(node: DelugeNode, name: str, size: int): assert info[b'name'] == name.encode('utf-8') # not sure that this works for ANY name... assert info[b'total_size'] == size - assert info[b'is_seed'] == True + assert info[b'is_seed'] @pytest.mark.integration