fix linting errors

This commit is contained in:
gmega 2024-12-14 06:31:20 -03:00
parent 5c13fdd7bd
commit 5c9ed47bc1
No known key found for this signature in database
GPG Key ID: 6290D34EAD824B18
6 changed files with 9 additions and 8 deletions

View File

@ -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)

View File

@ -1,2 +1,4 @@
# ruff: noqa: F403
from benchmarks.deluge.tests.fixtures import *
from benchmarks.core.tests.fixtures import *

View File

@ -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

View File

@ -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__)

View File

@ -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

View File

@ -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