Skip to content

Commit

Permalink
Run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
vbaltrusaitis-reef committed Nov 20, 2023
1 parent 97a345e commit 38006e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions b2/console_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from concurrent.futures import Executor, Future, ThreadPoolExecutor
from contextlib import suppress
from enum import Enum
from typing import Any, BinaryIO, Callable, Dict, List, Optional, Tuple
from typing import Any, BinaryIO, Dict, List, Optional, Tuple

import argcomplete
import b2sdk
Expand Down Expand Up @@ -423,7 +423,8 @@ def _setup_parser(cls, parser: argparse.ArgumentParser) -> None:
)
super()._setup_parser(parser)

def _file_info_with_header_args(self, args, file_info: dict[str, str] | None) -> dict[str, str] | None:
def _file_info_with_header_args(self, args,
file_info: dict[str, str] | None) -> dict[str, str] | None:
"""Construct an updated file_info dictionary.
Print a warning if any of file_info items will be overwritten by explicit header arguments.
"""
Expand Down Expand Up @@ -1072,7 +1073,8 @@ def run(self, args):

@B2.register_subcommand
class CopyFileById(
HeaderFlagsMixin, DestinationSseMixin, SourceSseMixin, FileRetentionSettingMixin, LegalHoldMixin, Command
HeaderFlagsMixin, DestinationSseMixin, SourceSseMixin, FileRetentionSettingMixin,
LegalHoldMixin, Command
):
"""
Copy a file version to the given bucket (server-side, **not** via download+upload).
Expand Down
4 changes: 2 additions & 2 deletions test/integration/test_b2_command_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -2723,7 +2723,8 @@ def assert_expected(file_info, expected=expected_file_info):
str(sample_filepath),
'sample_file',
*args,
'--info', 'b2-content-disposition=will-be-overwritten',
'--info',
'b2-content-disposition=will-be-overwritten',
]
)
assert status == 0
Expand All @@ -2734,7 +2735,6 @@ def assert_expected(file_info, expected=expected_file_info):
# a warning should be emitted
assert 'will be overwritten' in stderr and 'b2-content-disposition = attachment' in stderr


copied_version = b2_tool.should_succeed_json(
[
'copy-file-by-id', '--quiet', *args, '--contentType', 'text/plain',
Expand Down

0 comments on commit 38006e0

Please sign in to comment.