diff --git a/awscli/customizations/cloudtrail/validation.py b/awscli/customizations/cloudtrail/validation.py index 6df84ab9e87a..b7d2cc828b20 100644 --- a/awscli/customizations/cloudtrail/validation.py +++ b/awscli/customizations/cloudtrail/validation.py @@ -823,10 +823,9 @@ def _write_summary_text(self): def _write_ratio(self, valid, invalid, name): total = valid + invalid if total > 0: - sys.stdout.write('\n%d/%d %s files valid' % (valid, total, name)) + sys.stdout.write(f'\n{valid:d}/{total:d} {name} files valid') if invalid > 0: - sys.stdout.write(', %d/%d %s files INVALID' % (invalid, total, - name)) + sys.stdout.write(f', {invalid:d}/{total:d} {name} files INVALID') def _on_missing_digest(self, bucket, last_key, **kwargs): self._invalid_digests += 1 diff --git a/awscli/customizations/configure/addmodel.py b/awscli/customizations/configure/addmodel.py index 566ae9dfcc2d..d38574a47ece 100644 --- a/awscli/customizations/configure/addmodel.py +++ b/awscli/customizations/configure/addmodel.py @@ -77,8 +77,8 @@ def get_model_location(session, service_definition, service_name=None): data_path = session.get_component('data_loader').CUSTOMER_DATA_PATH # Use the version of the model to determine the file's naming convention. service_model_name = ( - 'service-%d.json' % int( - float(service_definition.get('version', '2.0')))) + f"service-{int(float(service_definition.get('version', '2.0'))):d}.json" + ) return os.path.join(data_path, service_name, api_version, service_model_name) diff --git a/awscli/customizations/configure/list.py b/awscli/customizations/configure/list.py index a1c073b5a961..25f4669278e6 100644 --- a/awscli/customizations/configure/list.py +++ b/awscli/customizations/configure/list.py @@ -77,9 +77,9 @@ def _run_main(self, args, parsed_globals): return 0 def _display_config_value(self, config_value, config_name): - self._stream.write('%10s %24s %16s %s\n' % ( - config_name, config_value.value, config_value.config_type, - config_value.config_variable)) + self._stream.write( + f'{config_name:10s} {config_value.value:24s} {config_value.config_type:16s} {config_value.config_variable}\n' + ) def _lookup_credentials(self): # First try it with _lookup_config. It's possible