Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start using python f-strings #1547

Closed
allmightyspiff opened this issue Sep 17, 2021 · 2 comments · Fixed by #1975, #1978, #1980, #1982 or #1984
Closed

Start using python f-strings #1547

allmightyspiff opened this issue Sep 17, 2021 · 2 comments · Fixed by #1975, #1978, #1980, #1982 or #1984
Assignees
Labels
Core Issues dealing with core functionality

Comments

@allmightyspiff
Copy link
Member

Something new that Tox is complaining about, but it would be a good idea to move to these since we no longer support python 2.

https://realpython.com/python-f-strings/
https://www.python.org/dev/peps/pep-0498/

Fstrings only support python 3.6+, so we will need to release a final version for 3.6 and lower before starting this project.

In the meantime, I'll set fstrings to be ignored.

analysis.txt

@allmightyspiff allmightyspiff added the Core Issues dealing with core functionality label Sep 17, 2021
@allmightyspiff allmightyspiff self-assigned this Sep 17, 2021
@allmightyspiff
Copy link
Member Author

allmightyspiff commented May 29, 2023

The following are all the instances of using .format() in the code base that can easily be replaced with an F string.

Also we should replace any instances of strings being added together result = "first part" + variables + "second part" like that.

result = "first part" + variables + "second part" should become result = f"first part {variables} second part"

TODO

  1. Create an issue to work on a specific command group so that we can resolve this issue in several smaller pull requests
  2. Convert any instances of variable substitution with F strings
  3. Create a pull request with that command group, including unit tests changes if needed.
  4. goto next.

Output

(py311) <WIN11> ~/Code/softlayer-python (sltypes)
$> git grep ".format("
SoftLayer/CLI/account/bandwidth_pools.py:        allocation = "{} GB".format(item.get('totalBandwidthAllocated', 0))
SoftLayer/CLI/account/bandwidth_pools.py:            current = "{} GB".format(current)
SoftLayer/CLI/account/bandwidth_pools.py:        projected = "{} GB".format(item.get('projectedPublicBandwidthUsage', 0))
SoftLayer/CLI/account/bandwidth_pools.py:            cost = "${}".format(cost)
SoftLayer/CLI/account/bandwidth_pools_detail.py:    current = "{} GB".format(utils.lookup(bandwidths, 'billingCyclePublicBandwidthUsage', 'amountOut'))
SoftLayer/CLI/account/bandwidth_pools_detail.py:    projected = "{} GB".format(bandwidths.get('projectedPublicBandwidthUsage', 0))
SoftLayer/CLI/account/bandwidth_pools_detail.py:    inbound = "{} GB".format(bandwidths.get('inboundPublicBandwidthUsage', 0))
SoftLayer/CLI/account/bandwidth_pools_detail.py:        amount = "{} GB".format(utils.lookup(bw_point, 'bandwidthAllotmentDetail', 'allocation', 'amount'))
SoftLayer/CLI/account/bandwidth_pools_detail.py:        current = "{} GB".format(bw_point.get('outboundBandwidthUsage', 0))
SoftLayer/CLI/account/bandwidth_pools_detail.py:        amount = "{} GB".format(utils.lookup(bw_point, 'bandwidthAllotmentDetail', 'allocation', 'amount'))
SoftLayer/CLI/account/bandwidth_pools_detail.py:        current = "{} GB".format(bw_point.get('outboundBandwidthUsage', 0))
SoftLayer/CLI/account/billing_items.py:        fqdn = "{}.{}".format(item.get('hostName', ''), item.get('domainName', ''))
SoftLayer/CLI/account/billing_items.py:            # ordered_by = "{} ({})".format(user.get('displayName'), utils.lookup(user, 'userStatus', 'name'))
SoftLayer/CLI/account/cancel_item.py:        env.fout("Item: {} was cancelled.".format(identifier))
SoftLayer/CLI/account/item_detail.py:    table = formatting.Table(["Key", "Value"], title="{}".format(item.get('description', 'Billing Item')))
SoftLayer/CLI/account/item_detail.py:    fqdn = "{}.{}".format(item.get('hostName', ''), item.get('domainName', ''))
SoftLayer/CLI/account/item_detail.py:        ordered_by = "{} ({})".format(user.get('displayName'), utils.lookup(user, 'userStatus', 'name'))
SoftLayer/CLI/block/access/list.py:              help='Columns to display. Options are: {0}.'.format(
SoftLayer/CLI/block/access/list.py:              help='Column to sort by. Options are: {0}.'.format(
SoftLayer/CLI/block/detail.py:    notes = '{}'.format(block_volume.get('notes', ''))
SoftLayer/CLI/block/duplicate.py:        click.echo("Order #{0} placed successfully!".format(
SoftLayer/CLI/block/list.py:              help='Columns to display. Options: {0}'.format(
SoftLayer/CLI/block/modify.py:        click.echo("Order #{0} placed successfully!".format(order['placedOrder']['id']))
SoftLayer/CLI/block/order.py:        click.secho('{} is a legacy storage offering'.format(service_offering), fg='red')
SoftLayer/CLI/block/order.py:        click.echo("Order #{0} placed successfully!".format(
SoftLayer/CLI/block/order.py:            'is ready.'.format(order['placedOrder']['id']))
SoftLayer/CLI/block/replication/locations.py:              help='Columns to display. Options: {0}'.format(
SoftLayer/CLI/block/replication/order.py:        click.echo("Order #{0} placed successfully!".format(
SoftLayer/CLI/block/replication/partners.py:              help='Columns to display. Options: {0}'.format(
SoftLayer/CLI/block/snapshot/get_notify_status.py:        click.echo("Disabled: Snapshots space usage threshold is disabled for volume {}".format(volume_id))
SoftLayer/CLI/block/snapshot/get_notify_status.py:        click.echo("Enabled: Snapshots space usage threshold is enabled for volume {}".format(volume_id))
SoftLayer/CLI/block/snapshot/list.py:              help='Columns to display. Options: {0}'.format(
SoftLayer/CLI/block/snapshot/order.py:        click.echo("Order #{0} placed successfully!".format(
SoftLayer/CLI/block/subnets/assign.py:            message = "Successfully assigned subnet id: {} to allowed host id: {}".format(subnet, access_id)
SoftLayer/CLI/block/subnets/assign.py:            message = "Failed to assign subnet id: {} to allowed host id: {}".format(subnet, access_id)
SoftLayer/CLI/block/subnets/assign.py:        message = "Unable to assign subnets.\nReason: {}".format(ex.faultString)
SoftLayer/CLI/block/subnets/list.py:            row = ["{0}".format(subnet['id']),
SoftLayer/CLI/block/subnets/list.py:                   "{0}".format(subnet['networkIdentifier']),
SoftLayer/CLI/block/subnets/list.py:                   "{0}".format(subnet['cidr'])]
SoftLayer/CLI/block/subnets/list.py:        message = "Unable to list assigned subnets for access-id: {}.\nReason: {}".format(access_id, ex.faultString)
SoftLayer/CLI/block/subnets/remove.py:            message = "Successfully removed subnet id: {} for allowed host id: {}".format(subnet, access_id)
SoftLayer/CLI/block/subnets/remove.py:            message = "Failed to remove subnet id: {} for allowed host id: {}".format(subnet, access_id)
SoftLayer/CLI/block/subnets/remove.py:        message = "Unable to remove subnets.\nReason: {}".format(ex.faultString)
SoftLayer/CLI/call_api.py:                                          format(_filter, type(_filter)))
SoftLayer/CLI/call_api.py:            raise exceptions.CLIAbort("\"{}\" is not valid JSON. {}".format(value, error))
SoftLayer/CLI/call_api.py:                                format(parameter, error), fg='red')
SoftLayer/CLI/cdn/delete.py:        env.fout("Cdn with uniqueId: {} was deleted.".format(unique_id))
SoftLayer/CLI/config/setup.py:        env.fout("Creating a Classic Infrastrucutre API key for {}".format(user['username']))
SoftLayer/CLI/config/setup.py:    headers['Authorization'] = 'Bearer {}'.format(a_token)
SoftLayer/CLI/config/setup.py:            env.fout("{}: {} ({})".format(counter, utils.lookup(selected, 'entity', 'name'), ims_id))
SoftLayer/CLI/config/setup.py:    print("Using account {}".format(utils.lookup(selected, 'entity', 'name')))
SoftLayer/CLI/config/setup.py:    env.fout("Get a one-time code from {} to proceed.".format(passcode_url))
SoftLayer/CLI/config/setup.py:        env.fout("Creating a Classic Infrastrucutre API key for {}".format(user['username']))
SoftLayer/CLI/core.py:        latest = 'v{}'.format(json_result['info']['version'])
SoftLayer/CLI/core.py:    click.secho("Current: {prog} {current}\nLatest:  {prog} {latest}".format(
SoftLayer/CLI/core.py:            call_table = formatting.Table(['', '{}::{}'.format(call.service, call.method)], align="left")
SoftLayer/CLI/custom_types.py:            self.fail('{} is not a valid network'.format(value), param, ctx)
SoftLayer/CLI/dns/zone_import.py:        click.secho("Parsed: %s" % RECORD_FMT.format(**record), fg="green")
SoftLayer/CLI/dns/zone_import.py:            click.secho(click.style("Created: %s" % RECORD_FMT.format(**record), fg='green'))
SoftLayer/CLI/dns/zone_import.py:            click.secho(click.style("Failed: %s" % RECORD_FMT.format(**record), fg='red'))
SoftLayer/CLI/dns/zone_list.py:            zone_date = "{}-{}-{}T00:00:00-06:00".format(zone_serial[0:4], zone_serial[4:6], zone_serial[6:8])
SoftLayer/CLI/event_log/get.py:            click.secho("'{0}','{1}','{2}','{3}','{4}','{5}'".format(
SoftLayer/CLI/event_log/get.py:            click.secho("'{0}','{1}','{2}','{3}','{4}'".format(
SoftLayer/CLI/file/access/list.py:              help='Columns to display. Options: {0}'.format(
SoftLayer/CLI/file/detail.py:    notes = '{}'.format(file_volume.get('notes', ''))
SoftLayer/CLI/file/duplicate.py:        click.echo("Order #{0} placed successfully!".format(
SoftLayer/CLI/file/list.py:              help='Columns to display. Options: {0}'.format(
SoftLayer/CLI/file/modify.py:        click.echo("Order #{0} placed successfully!".format(order['placedOrder']['id']))
SoftLayer/CLI/file/order.py:        click.secho('{} is a legacy storage offering'.format(service_offering), fg='red')
SoftLayer/CLI/file/order.py:        click.echo("Order #{0} placed successfully!".format(
SoftLayer/CLI/file/order.py:            'is ready.'.format(order['placedOrder']['id']))
SoftLayer/CLI/file/replication/locations.py:              help='Columns to display. Options: {0}'.format(
SoftLayer/CLI/file/replication/order.py:        click.echo("Order #{0} placed successfully!".format(
SoftLayer/CLI/file/replication/partners.py:              help='Columns to display. Options: {0}'.format(
SoftLayer/CLI/file/snapshot/get_notify_status.py:        click.echo("Disabled: Snapshots space usage threshold is disabled for volume {}".format(volume_id))
SoftLayer/CLI/file/snapshot/get_notify_status.py:        click.echo("Enabled: Snapshots space usage threshold is enabled for volume {}".format(volume_id))
SoftLayer/CLI/file/snapshot/list.py:              help='Columns to display. Options: {0}'.format(
SoftLayer/CLI/file/snapshot/order.py:        click.echo("Order #{0} placed successfully!".format(
SoftLayer/CLI/formatting.py:        return csv_output_format(data)
SoftLayer/CLI/formatting.py:    return "{:.2f} {}".format(value, units[unit_index])
SoftLayer/CLI/formatting.py:    return "{:.2f} {}".format(total_value, total_unit)
SoftLayer/CLI/formatting.py:def csv_output_format(data, delimiter=','):
SoftLayer/CLI/formatting.py:    write_csv_format(sys.stdout, data, delimiter)
SoftLayer/CLI/formatting.py:                write_csv_format(string_io, value, delimiter, quoting=csv.QUOTE_MINIMAL)
SoftLayer/CLI/formatting.py:def write_csv_format(support_output, data, delimiter, quoting=csv.QUOTE_NONNUMERIC):
SoftLayer/CLI/hardware/create.py:                click.secho('Warning: Closed soon: {}'.format(pod['name']), fg='yellow')
SoftLayer/CLI/hardware/detail.py:    last_transaction = "{} ({})".format(utils.lookup(result, 'lastTransaction', 'transactionGroup', 'name'),
SoftLayer/CLI/hardware/dns.py:            message = "{} does not have an ipv6 address".format(instance['fullyQualifiedDomainName'])
SoftLayer/CLI/hardware/notification_add.py:            raise exceptions.CLIAbort("User not found: {}.".format(user))
SoftLayer/CLI/hardware/notification_delete.py:        env.fout("The hardware notification instance: {} was deleted.".format(identifier))
SoftLayer/CLI/image/share.py:        env.fout("Image template {} was shared to account {}.".format(identifier, account_id))
SoftLayer/CLI/image/share_deny.py:        env.fout("Image template {} was deny shared to account {}.".format(identifier, account_id))
SoftLayer/CLI/licenses/cancel.py:        env.fout("License key: {} was cancelled.".format(key))
SoftLayer/CLI/loadbal/detail.py:    table.add_row(['Status', "{} / {}".format(this_lb.get('provisioningStatus'), this_lb.get('operatingStatus'))])
SoftLayer/CLI/loadbal/detail.py:        priv_map = "{}:{}".format(pool['protocol'], pool['protocolPort'])
SoftLayer/CLI/loadbal/detail.py:        mapping = "{}:{} -> {}".format(listener.get('protocol'), listener.get('protocolPort'), priv_map)
SoftLayer/CLI/loadbal/health.py:    print("UUID: {}, ID: {}".format(lb_uuid, lb_id))
SoftLayer/CLI/loadbal/health.py:        click.secho('Health Check {} updated successfully'.format(uuid), fg='green')
SoftLayer/CLI/loadbal/health.py:        click.secho('Failed to update {}'.format(uuid), fg='red')
SoftLayer/CLI/loadbal/health.py:        click.secho("ERROR: {}".format(exception.faultString), fg='red')
SoftLayer/CLI/loadbal/members.py:        click.secho("Member {} removed".format(member), fg='green')
SoftLayer/CLI/loadbal/members.py:        click.secho("ERROR: {}".format(exception.faultString), fg='red')
SoftLayer/CLI/loadbal/members.py:        click.secho("Member {} added".format(member), fg='green')
SoftLayer/CLI/loadbal/members.py:        click.secho("ERROR: {}".format(exception.faultString), fg='red')
SoftLayer/CLI/loadbal/ns_detail.py:            "{}/{}".format(subnet.get('networkIdentifier'), subnet.get('cidr')),
SoftLayer/CLI/loadbal/order.py:        raise exceptions.ArgumentError("{}={} is not properly formatted.".format(param, value))
SoftLayer/CLI/loadbal/order.py:        raise exceptions.CLIHalt('Datacenter {} was not found'.format(datacenter))
SoftLayer/CLI/loadbal/order.py:    table = formatting.KeyValueTable(['Item', 'Cost'], title="Order: {}".format(receipt.get('orderId', 'Quote')))
SoftLayer/CLI/loadbal/order.py:                space = "{}/{}".format(subnet.get('networkIdentifier'), subnet.get('cidr'))
SoftLayer/CLI/loadbal/order.py:                vlan = "{}.{}".format(subnet['podName'], subnet['networkVlan']['vlanNumber'])
SoftLayer/CLI/loadbal/order.py:        click.secho("LB {} canceled succesfully.".format(identifier), fg='green')
SoftLayer/CLI/loadbal/order.py:        click.secho("ERROR: {}".format(exception.faultString), fg='red')
SoftLayer/CLI/loadbal/pools.py:                "--server needs a port and a weight. {} improperly formatted".format(server))
SoftLayer/CLI/loadbal/pools.py:        click.secho("ERROR: {}".format(exception.faultString), fg='red')
SoftLayer/CLI/loadbal/pools.py:        click.secho("ERROR: {}".format(exception.faultString), fg='red')
SoftLayer/CLI/loadbal/pools.py:        click.secho("ERROR: {}".format(exception.faultString), fg='red')
SoftLayer/CLI/loadbal/pools.py:        click.secho("ERROR: {}".format(exception.faultString), fg='red')
SoftLayer/CLI/loadbal/pools.py:        click.secho("ERROR: {}".format(exception.faultString), fg='red')
SoftLayer/CLI/metadata.py:""".format(choices="\n    ".join(META_CHOICES))
SoftLayer/CLI/order/lookup.py:    title = "Order {id}".format(id=order.get('id'))
SoftLayer/CLI/order/lookup.py:        ordered_by = "{} ({})".format(user.get('displayName'), utils.lookup(user, 'userStatus', 'name'))
SoftLayer/CLI/order/lookup.py:    table.add_row(['Order Total Amount', "{price:.2f}".format(price=float(order.get('orderTotalAmount', '0')))])
SoftLayer/CLI/order/lookup.py:                  format(price=float(order.get('initialInvoice', {}).get('invoiceTotalAmount', '0')))])
SoftLayer/CLI/order/place.py:            click.secho('Warning: Closed soon: {}'.format(pod.get('name')), fg='yellow')
SoftLayer/CLI/order/place.py:            raise exceptions.CLIAbort("There was an error when parsing the --extras value: {}".format(err))
SoftLayer/CLI/order/place_quote.py:            raise exceptions.CLIAbort("There was an error when parsing the --extras value: {}".format(err))
SoftLayer/CLI/order/quote.py:            raise exceptions.CLIAbort("There was an error when parsing the --extras value: {}".format(err))
SoftLayer/CLI/order/quote_detail.py:    title = "{} - Package: {}, Id {}".format(result.get('name'), package['keyName'], package['id'])
SoftLayer/CLI/report/dc_closures.py:                                search.format(pod.get('backendRouterName'), pod.get('frontendRouterName')),
SoftLayer/CLI/storage_utils.py:        return "{0}.{1}".format(obj['hostname'], obj['domain'])
SoftLayer/CLI/storage_utils.py:        return "{0}.{1}".format(obj['hostname'], obj['domain'])
SoftLayer/CLI/storage_utils.py:        name = "{0}/{1}".format(
SoftLayer/CLI/storage_utils.py:            name = "{0} ({1})".format(name, obj['note'])
SoftLayer/CLI/storage_utils.py:            name = "{0} ({1})".format(name, obj['note'])
SoftLayer/CLI/subnet/create.py:        raise exceptions.CLIAbort('Unable to order {} {} ipv{} , error: {}'.format(quantity,
SoftLayer/CLI/subnet/edit.py:        click.secho("{} successfully".format(detail), fg='green')
SoftLayer/CLI/subnet/edit.py:        click.secho("Failed to {}".format(detail.lower()), fg='red')
SoftLayer/CLI/tags/cleanup.py:            click.secho("(Dry Run) Removing {}".format(tag.get('name')), fg='yellow')
SoftLayer/CLI/tags/cleanup.py:            click.secho("Removing {}".format(tag.get('name')), fg=color)
SoftLayer/CLI/tags/delete.py:        click.secho("Tag {} has been removed".format(tag_name), fg='green')
SoftLayer/CLI/tags/delete.py:        click.secho("Failed to remove tag {}".format(tag_name), fg='red')
SoftLayer/CLI/tags/list.py:        name = "{}".format(exception.reason)
SoftLayer/CLI/tags/taggable.py:        title = "{} ({})".format(tag_type['description'], tag_type['keyName'])
SoftLayer/CLI/user/list.py:        user = _yes_format(user, [TWO_FACTO_AUTH, CLASSIC_API_KEYS])
SoftLayer/CLI/user/list.py:def _yes_format(user, keys):
SoftLayer/CLI/user/vpn_manual.py:    message = "{} vpn manual config {}".format(user, 'enable' if enable else 'disable')
SoftLayer/CLI/user/vpn_manual.py:        click.secho("Failed to update {}".format(user), fg='red')
SoftLayer/CLI/virt/cancel.py:        env.fout("The virtual server instance: {} was cancelled.".format(vs_id))
SoftLayer/CLI/virt/create.py:                click.secho('Warning: Closed soon: {}'.format(pod['name']), fg='yellow')
SoftLayer/CLI/virt/detail.py:        last_transaction = "{} ({})".format(utils.lookup(result, 'lastTransaction', 'transactionGroup', 'name'),
SoftLayer/CLI/virt/dns.py:            message = "{} does not have an ipv6 address".format(instance['fullyQualifiedDomainName'])
SoftLayer/CLI/virt/edit.py:                env.fout("The {} of virtual server instance: {} was updated.".format(key, vs_id))
SoftLayer/CLI/virt/edit.py:            env.fout("The public speed of virtual server instance: {} was updated.".format(vs_id))
SoftLayer/CLI/virt/edit.py:            env.fout("The private speed of virtual server instance: {} was updated.".format(vs_id))
SoftLayer/CLI/virt/migrate.py:        click.secho("Started a migration on {}".format(vsi_id), fg='green')
SoftLayer/CLI/virt/migrate.py:        click.secho("Failed to migrate {}. {}".format(vsi_id, str(ex)), fg='red')
SoftLayer/CLI/virt/notification_delete.py:        env.fout("The virtual server notification instance: {} was deleted.".format(identifier))
SoftLayer/CLI/virt/storage.py:                "{capacity} {unit}".format(capacity=disk['diskImage']['capacity'],
SoftLayer/CLI/vlan/cancel.py:            env.fout("VLAN {} was cancelled.".format(identifier))
SoftLayer/CLI/vlan/create.py:                "Unable to find pod name: {}".format(pod))
SoftLayer/CLI/vpn/ipsec/cancel.py:        env.fout("Ipsec {} was cancelled.".format(identifier))
SoftLayer/CLI/vpn/ipsec/configure.py:        click.echo('Configuration request received for context #{}'.format(context_id))
SoftLayer/CLI/vpn/ipsec/configure.py:        raise CLIHalt('Failed to enqueue configuration request for context #{}'.format(context_id))
SoftLayer/CLI/vpn/ipsec/detail.py:    return '[mask[{}]]'.format(','.join(entries))
SoftLayer/CLI/vpn/ipsec/subnet/add.py:                                .format(subnet_type))
SoftLayer/CLI/vpn/ipsec/subnet/add.py:                .format(network_identifier[0],
SoftLayer/CLI/vpn/ipsec/subnet/add.py:        env.out('Added {} subnet #{}'.format(subnet_type, subnet_id))
SoftLayer/CLI/vpn/ipsec/subnet/add.py:                      .format(subnet_type, subnet_id))
SoftLayer/CLI/vpn/ipsec/subnet/remove.py:        env.out('Removed {} subnet #{}'.format(subnet_type, subnet_id))
SoftLayer/CLI/vpn/ipsec/subnet/remove.py:                      .format(subnet_type, subnet_id))
SoftLayer/CLI/vpn/ipsec/translation/add.py:            .format(static_ip, remote_ip, translation['id']))
SoftLayer/CLI/vpn/ipsec/translation/remove.py:        env.out('Removed translation #{}'.format(translation_id))
SoftLayer/CLI/vpn/ipsec/translation/remove.py:        raise CLIHalt('Failed to remove translation #{}'.format(translation_id))
SoftLayer/CLI/vpn/ipsec/translation/update.py:        env.out('Updated translation #{}'.format(translation_id))
SoftLayer/CLI/vpn/ipsec/translation/update.py:        raise CLIHalt('Failed to update translation #{}'.format(translation_id))
SoftLayer/CLI/vpn/ipsec/update.py:        env.out('Updated context #{}'.format(context_id))
SoftLayer/CLI/vpn/ipsec/update.py:        raise CLIHalt('Failed to update context #{}'.format(context_id))
SoftLayer/auth.py:        request.transport_headers['Authorization'] = 'Bearer {}'.format(self.api_key)
SoftLayer/auth.py:        return "BearerAuthentication(username={}, token={})".format(self.username, self.api_key)
SoftLayer/exceptions.py:        return "{} ({}): {}".format(self.url, self.faultCode, self.faultString)
SoftLayer/exceptions.py:        return "{} ({}): {}".format(self.url, self.faultCode, self.faultString)
SoftLayer/managers/account.py:            note = "Cancelled by {} with the SLCLI".format(user.get('username'))
SoftLayer/managers/event_log.py:                print("Event Name: {}".format(log['eventName']))
SoftLayer/managers/hardware.py:                raise SoftLayerError("Unable to find a datacenter named {}".format(datacenter))
SoftLayer/managers/image.py:                raise exceptions.SoftLayerError(output_error.format(location_name, image_id))
SoftLayer/managers/ipsec.py:                                    .format(context_id))
SoftLayer/managers/ipsec.py:                                    .format(translation_id))
SoftLayer/managers/license.py:                "Unable to find license key: {}".format(key))
SoftLayer/managers/load_balancer.py:            raise exceptions.SoftLayerError("Unable to find LBaaS with name: {}".format(name))
SoftLayer/managers/object_storage.py:            raise SoftLayerError("Multiple object storage accounts found with the name: {}".format(username))
SoftLayer/managers/object_storage.py:            raise SoftLayerError("Unable to find object storage account id for: {}".format(username))
SoftLayer/managers/ordering.py:            raise exceptions.SoftLayerError("Package {} does not exist".format(package_keyname))
SoftLayer/managers/ordering.py:                "Preset {} does not exist in package {}".format(preset_keyname,
SoftLayer/managers/ordering.py:                message = "Item {} does not exist for package {}".format(item_keyname,
SoftLayer/managers/ordering.py:            raise exceptions.SoftLayerError("Invalid location {}".format(location_key))
SoftLayer/managers/ordering.py:        raise exceptions.SoftLayerError("Location {} does not exist".format(location_key))
SoftLayer/managers/storage_utils.py:    key_name = 'STORAGE_SPACE_FOR_{0}_IOPS_PER_GB'.format(tier_level)
SoftLayer/managers/storage_utils.py:        key_name = '{0}_{1}_GBS'.format(capacity_minimum, capacity_maximum)
SoftLayer/managers/tags.py:            raise SoftLayerAPIError(404, "Unable to lookup {} types".format(tag_type))
SoftLayer/managers/tags.py:        search_term = "_objectType:SoftLayer_{}".format(service)
SoftLayer/managers/tags.py:            search_term = "{} status.name: open".format(search_term)
SoftLayer/managers/tags.py:            return "{} ({})".format(resource.get('vlanNumber'), resource.get('name'))
SoftLayer/managers/user.py:                raise exceptions.SoftLayerError("{} is not a valid notification name".format(notification))
SoftLayer/managers/user.py:                raise exceptions.SoftLayerError(output_error.format(subnet, user_id))
SoftLayer/managers/vs.py:                raise SoftLayerError("Unable to find a datacenter named {}".format(datacenter))
SoftLayer/transports/debug.py:        output = "Calling: {})".format(call)
SoftLayer/transports/debug.py:        output = "Returned Data: \n{}".format(json.dumps(call.result))
SoftLayer/transports/fixture.py:            message = '{} fixture is not implemented'.format(call.service)
SoftLayer/transports/fixture.py:            message = '{}::{} fixture is not implemented'.format(call.service, call.method)
SoftLayer/transports/rest.py:            data = "-d '{}'".format(request.payload)
SoftLayer/transports/rest.py:        headers = ['"{0}: {1}"'.format(k, v) for k, v in request.transport_headers.items()]
SoftLayer/transports/rest.py:        return command.format(method=method, headers=headers, data=data, uri=request.url)
SoftLayer/transports/transport.py:        param_string = "id={id}, mask='{mask}', filter='{filter}', args={args}, limit={limit}, offset={offset}".format(
SoftLayer/transports/transport.py:        return "{service}::{method}({params})".format(
SoftLayer/utils.py:    dirty_time = user_date.isoformat()
SoftLayer/utils.py:    cleaned_time = "{}.000000{}".format(dirty_time, iso_time_zone)
cliChecker/checker.py:            flags.append('{},{}: {}'.format(arrayFlags[1].strip(), arrayFlags[2].strip(), arrayFlags[3].strip()))
cliChecker/checker.py:            flags.append('{}: {}'.format(arrayFlags[2].strip(), arrayFlags[3].strip()))
cliChecker/checker.py:        f.write('slcli {} {} {}\n'.format(TopLevelCommand, command, nestedCommandName))
cliChecker/checker.py:        f.write('slcli {} {}\n'.format(TopLevelCommand, command))
cliChecker/checker.py:        f.write('\tFlag: {}\n'.format(flag))
cliChecker/checker.py:    f.write('\tDescription: {}\n'.format(commandArray[2].strip()))
cliChecker/checker.py:    f.write('\tUsage: {}\n'.format(commandArray[0]))
docCheck.py:            path = ".{seper}docs{seper}cli".format(seper=os.path.sep)
docCheck.py:                        print("{} is documented".format(command[0]))
docCheck.py:                    print("===> {} {} IS UNDOCUMENTED <===".format(command[0], command[1]))
docs/api/client.rst:        print("{}, {}".format(item['id'], item['hostName']))
docs/api/client.rst:    print("{}, {}".format(item.get('id'), item.get('hostName')))
docs/api/client.rst:    print("{}, {}".format(itemId, itemHostname))
tests/CLI/modules/account_tests.py:        print("RESULT: {}".format(result.output))
tests/CLI/modules/account_tests.py:            print("TESTING THIS: \n{}\n".format(json_text_table))
tests/CLI/modules/account_tests.py:    def test_invoice_detail_csv_output_format(self):
tests/CLI/modules/call_api_tests.py:        print("OUTPUT: \n{}".format(result.exception))
tests/CLI/modules/call_api_tests.py:        output = '{} fixture is not implemented'.format(service)
tests/CLI/modules/loadbal_tests.py:        output = 'Member {} added'.format(member_ip_address)
tests/CLI/modules/loadbal_tests.py:        output = 'Member {} added'.format(member_ip_address)
tests/CLI/modules/loadbal_tests.py:        self.assertIn("ERROR: {}".format(fault_string),
tests/CLI/modules/loadbal_tests.py:        self.assertIn("ERROR: {}".format(fault_string),
tests/CLI/modules/loadbal_tests.py:        output = 'Member {} removed'.format(lbaas_member_uuid)
tests/CLI/modules/loadbal_tests.py:        output = 'Health Check {} updated successfully'.format(lb_check_uuid)
tests/CLI/modules/loadbal_tests.py:        self.assertIn("ERROR: {}".format(fault_string),
tests/managers/ordering_tests.py:        self.assertEqual('Preset {} does not exist in package {}'.format(keyname, 'PACKAGE_KEYNAME'), str(exc))
tests/managers/tag_tests.py:            {'input': 'NETWORK_VLAN', 'output': "{} ({})".format(resource.get('vlanNumber'), resource.get('name')

ramkishor-ch pushed a commit to ramkishor-ch/softlayer-python that referenced this issue Jun 7, 2023
updated to f{}
@ramkishor-ch ramkishor-ch linked a pull request Jun 7, 2023 that will close this issue
ramkishor-ch pushed a commit to ramkishor-ch/softlayer-python that referenced this issue Jun 7, 2023
ramkishor-ch pushed a commit to ramkishor-ch/softlayer-python that referenced this issue Jun 7, 2023
update order.py file for f{}
ramkishor-ch pushed a commit to ramkishor-ch/softlayer-python that referenced this issue Jun 7, 2023
double quotes added in order_block_volume function
ramkishor-ch pushed a commit to ramkishor-ch/softlayer-python that referenced this issue Jun 7, 2023
updated from  to ''
ramkishor-ch pushed a commit to ramkishor-ch/softlayer-python that referenced this issue Jun 7, 2023
ramkishor-ch pushed a commit to ramkishor-ch/softlayer-python that referenced this issue Jun 7, 2023
ramkishor-ch pushed a commit to ramkishor-ch/softlayer-python that referenced this issue Jun 8, 2023
added \'
ramkishor-ch pushed a commit to ramkishor-ch/softlayer-python that referenced this issue Jun 8, 2023
added space
ramkishor-ch pushed a commit to ramkishor-ch/softlayer-python that referenced this issue Jun 8, 2023
removed space
ramkishor-ch pushed a commit to ramkishor-ch/softlayer-python that referenced this issue Jun 8, 2023
added \' in different unit test case function
ramkishor-ch pushed a commit to ramkishor-ch/softlayer-python that referenced this issue Jun 8, 2023
added \' in different unit test case function
@allmightyspiff
Copy link
Member Author

Completed. The few remaining .format() uses are intentional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment