Skip to content

Commit

Permalink
style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lindt committed Aug 14, 2016
1 parent bc5bacf commit 53907e0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ end
desc 'Checks style'
task audit: :rubocop
task :audit do
ignores = %w(D100 D101 D102 D103 E501 I201)
ignores = %w(D100 D101 D102 D103 D104 E501 I201)

FILES = FileList[%w(bin/compose_format compose_format/*.py setup.py)]
sh "flake8 --ignore='#{ignores * ','}' #{FILES}"
Expand Down
2 changes: 1 addition & 1 deletion bin/compose_format
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ if __name__ == '__main__':
for path in args.files:
if not formatter.format(path, replace=args.replace, strict=not args.non_strict):
if args.replace:
print('path {} has been changed'.format(path))
print('path {0} has been changed'.format(path))
if not args.ignore_changes:
sys.exit(1)
6 changes: 3 additions & 3 deletions compose_format/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ComposeFormat:
ORDERS = {
'version': TOPLEVEL_ORDER,
'image': SERVICE_ORDER,
'dockerfile': BUILD_ORDER
'dockerfile': BUILD_ORDER,
}

def __init__(self):
Expand Down Expand Up @@ -58,7 +58,7 @@ def is_legacy_version(data):

vspacing = [1, 0] if is_legacy_version(data) else [0, 1, 0]

formatted = pyaml.dump(data, vspacing=vspacing, indent=2, width=120, string_val_style='plain')
formatted = pyaml.dump(data, vspacing=vspacing, indent=2, width=119, string_val_style='plain')
return formatted.strip() + '\n'

@staticmethod
Expand Down Expand Up @@ -86,7 +86,7 @@ def order(item):
if type(data) is list:
return sorted([ComposeFormat.reorder(item, strict=strict) for item in data])
if len(str(data)) >= 1 and str(data)[0].isdigit():
return '\'{}\''.format(data)
return '\'{0}\''.format(data)
return data

@staticmethod
Expand Down

0 comments on commit 53907e0

Please sign in to comment.