From 696d95bf1b1ffcaaffb388154e314e700c579b02 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 8 Apr 2022 18:36:43 +0300 Subject: [PATCH] Black formatter --- platformio/package/commands/publish.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/platformio/package/commands/publish.py b/platformio/package/commands/publish.py index 9028bd31..69b1ac63 100644 --- a/platformio/package/commands/publish.py +++ b/platformio/package/commands/publish.py @@ -53,7 +53,8 @@ def validate_datetime(ctx, param, value): # pylint: disable=unused-argument "Default is set to a username of the authorized PIO Account", ) @click.option( - "--type", "type_", + "--type", + "type_", type=click.Choice(list(PackageType.items().values())), help="Custom package type", ) @@ -78,9 +79,11 @@ def package_publish_cmd( # pylint: disable=too-many-arguments, too-many-locals ): click.secho("Preparing a package...", fg="cyan") owner = owner or AccountClient().get_logged_username() - do_not_pack = not os.path.isdir(package) and isinstance( - FileUnpacker.new_archiver(package), TARArchiver - ) and PackageType.from_archive(package) + do_not_pack = ( + not os.path.isdir(package) + and isinstance(FileUnpacker.new_archiver(package), TARArchiver) + and PackageType.from_archive(package) + ) archive_path = None with tempfile.TemporaryDirectory() as tmp_dir: # pylint: disable=no-member # publish .tar.gz instantly without repacking