Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
myrrc committed Jul 6, 2023
1 parent 317af19 commit 9e67515
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
4 changes: 1 addition & 3 deletions src/chtools/chadmin/cli/chs3_backup_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ def cleanup_backups(ctx, dry_run, keep_going):
)


def delete_chs3_backups(
ctx, chs3_backups, *, keep_going=False, dry_run=False
):
def delete_chs3_backups(ctx, chs3_backups, *, keep_going=False, dry_run=False):
"""
Delete CHS3 backups.
"""
Expand Down
8 changes: 3 additions & 5 deletions src/chtools/chadmin/cli/object_storage_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys
from datetime import datetime, timedelta, timezone
from gzip import GzipFile
from io import TextIOWrapper, IOBase
from io import IOBase, TextIOWrapper
from pathlib import Path
from typing import Dict, Iterator, List, Optional, Union

Expand Down Expand Up @@ -173,7 +173,7 @@ def list_objects(
help="Input stream is compressed using GZIP format",
)
@pass_context
def clean_object_storage(ctx , file , compressed ):
def clean_object_storage(ctx, file, compressed):
disk_conf: S3DiskConfiguration = ctx.obj["disk_configuration"]

if compressed:
Expand All @@ -189,9 +189,7 @@ def clean_object_storage(ctx , file , compressed ):


@contextlib.contextmanager
def dump_writer(
compressed, file_path = None
):
def dump_writer(compressed, file_path=None):
writer = open(file_path, "wb") if file_path is not None else sys.stdout.buffer
try:
yield GzipFile(mode="wb", fileobj=writer) if compressed else writer
Expand Down
6 changes: 2 additions & 4 deletions src/chtools/chadmin/internal/diagnostics/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import yaml
from requests.exceptions import RequestException

from chtools.common.clickhouse.client import OutputFormat, ClickhouseClient
from chtools.common.clickhouse.client import ClickhouseClient, OutputFormat

from .utils import delayed

Expand Down Expand Up @@ -194,9 +194,7 @@ def _write_result(buffer_, result, format_=None):


@delayed
def add_query(
diagnostics, name, client, query, format_, section=None
):
def add_query(diagnostics, name, client, query, format_, section=None):
query_args = {
"normalize_queries": diagnostics.normalize_queries,
}
Expand Down

0 comments on commit 9e67515

Please sign in to comment.