mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 09:50:37 +00:00
pylint E1601(print-statement)
This commit is contained in:
parent
4e1a5922f7
commit
43e54d26cc
9 changed files with 22 additions and 10 deletions
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import os
|
||||
|
||||
|
||||
|
@ -82,7 +83,7 @@ def inline_replace(file_path, pattern, subst):
|
|||
for line in fileinput.input(files=file_path, inplace=True):
|
||||
(replacement, count) = re.subn(pattern, subst, line)
|
||||
replacement_count += count
|
||||
print replacement,
|
||||
print(replacement, end=' ')
|
||||
return replacement_count
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import print_function
|
||||
|
||||
from bootstrapvz.base import Task
|
||||
from bootstrapvz.common import phases
|
||||
from bootstrapvz.common.tools import log_check_call
|
||||
|
@ -98,7 +100,7 @@ class DisableModules(Task):
|
|||
import fileinput
|
||||
for line in fileinput.input(files=cloud_cfg, inplace=True):
|
||||
if not regex.match(line):
|
||||
print line,
|
||||
print(line, end=' ')
|
||||
|
||||
|
||||
class EnableModules(Task):
|
||||
|
@ -122,7 +124,7 @@ class EnableModules(Task):
|
|||
count = count + 1
|
||||
if int(entry['position']) == int(count):
|
||||
print(" - %s" % entry['module'])
|
||||
print line,
|
||||
print(line, end=' ')
|
||||
|
||||
|
||||
class SetCloudInitMountOptions(Task):
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import print_function
|
||||
|
||||
from bootstrapvz.base import Task
|
||||
from bootstrapvz.common import phases
|
||||
|
||||
|
@ -27,6 +29,6 @@ class SetNtpServers(Task):
|
|||
# Will write all the specified servers on the first match, then supress all other default servers
|
||||
if re.match(debian_ntp_server, line):
|
||||
while servers:
|
||||
print 'server {server_address} iburst'.format(server_address=servers.pop(0))
|
||||
print('server {server_address} iburst'.format(server_address=servers.pop(0)))
|
||||
else:
|
||||
print line,
|
||||
print(line, end=' ')
|
||||
|
|
7
pylintrc
7
pylintrc
|
@ -27,14 +27,14 @@ load-plugins=
|
|||
# Enable the message, report, category or checker with the given id(s). You can
|
||||
# either give multiple identifier separated by comma (,) or put this option
|
||||
# multiple time.
|
||||
enable=W0401,W0403,W0404,W0406,W0611,W0614
|
||||
enable=
|
||||
|
||||
# Disable the message, report, category or checker with the given id(s). You
|
||||
# can either give multiple identifier separated by comma (,) or put this option
|
||||
# multiple time.
|
||||
disable=W0511,C0111,I0011,I0020,R0201,R0801,E0632,E1121,E1601,E1608,W0102,W0106,W0108,W0110,W0201,W0212,W0311,W0402,W0612,W0613,W0640,W1201,W1202,W1401,C0103,C0301,C0325,C0326,C0330,C0411,R0401,R0914,R1710
|
||||
disable=W0511,C0111,I0011,I0020,R0201,R0801,E0632,E1121,E1608,W0102,W0106,W0108,W0110,W0201,W0212,W0311,W0402,W0612,W0613,W0640,W1201,W1202,W1401,C0103,C0301,C0325,C0326,C0330,C0411,R0401,R0914,R1710
|
||||
# W0511 fixme
|
||||
# C0111 mssing-docstring
|
||||
# C0111 missing-docstring
|
||||
# I0011 locally-disabled
|
||||
# I0020 suppressed-message
|
||||
# R0801 duplicate-code
|
||||
|
@ -42,7 +42,6 @@ disable=W0511,C0111,I0011,I0020,R0201,R0801,E0632,E1121,E1601,E1608,W0102,W0106,
|
|||
#TODO
|
||||
# E0632(unbalanced-tuple-unpacking)
|
||||
# E1121(too-many-function-args)
|
||||
# E1601(print-statement)
|
||||
# E1608(old-octal-literal)
|
||||
# W0102(dangerous-default-value)
|
||||
# W0106(expression-not-assigned)
|
||||
|
|
|
@ -26,4 +26,4 @@ def test_stable():
|
|||
custom_partials = [partials['docker']]
|
||||
manifest_data = merge_manifest_data(std_partials, custom_partials)
|
||||
with boot_manifest(manifest_data) as instance:
|
||||
print('\n'.join(instance.run(['echo', 'test'])))
|
||||
print('\n'.join(instance.run(['echo', 'test']))) # pylint: disable=print-statement
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
from .manifests import merge_manifest_data
|
||||
from .tools import boot_manifest
|
||||
|
||||
# pylint: disable=print-statement
|
||||
|
||||
partials = {'ebs_hvm': '''
|
||||
provider:
|
||||
name: ec2
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
from .manifests import merge_manifest_data
|
||||
from .tools import boot_manifest
|
||||
|
||||
# pylint: disable=print-statement
|
||||
|
||||
partials = {'ebs_pvm': '''
|
||||
provider:
|
||||
name: ec2
|
||||
|
|
|
@ -2,6 +2,8 @@ from .manifests import merge_manifest_data
|
|||
from .tools import boot_manifest
|
||||
import random
|
||||
|
||||
# pylint: disable=print-statement
|
||||
|
||||
s3_bucket_name = '{id:x}'.format(id=random.randrange(16 ** 16))
|
||||
partials = {'s3_pvm': '''
|
||||
provider:
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
from .manifests import merge_manifest_data
|
||||
from .tools import boot_manifest
|
||||
|
||||
# pylint: disable=print-statement
|
||||
|
||||
partials = {'vdi': '{provider: {name: virtualbox}, volume: {backing: vdi}}',
|
||||
'vmdk': '{provider: {name: virtualbox}, volume: {backing: vmdk}}',
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue