Skip to content

Commit

Permalink
manual ruff check fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kdaily committed Dec 23, 2024
1 parent 21de3a3 commit 1e25afc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions awscli/customizations/cloudtrail/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions awscli/customizations/configure/addmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions awscli/customizations/configure/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:10} {config_value.value:24} {config_value.config_type:16} {config_value.config_variable}\n'
)

def _lookup_credentials(self):
# First try it with _lookup_config. It's possible
Expand Down

0 comments on commit 1e25afc

Please sign in to comment.