1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

PEP8: fix E124: closing bracket does not match visual indentation

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Joe Guo 2018-07-30 18:14:43 +12:00 committed by Douglas Bagnall
parent 484ce0634b
commit dba0c7ebe5
16 changed files with 30 additions and 30 deletions

View File

@ -1316,7 +1316,7 @@ class RejectSubDBIndex(LdbBaseTest):
"@IDXONE": [b"1"],
"@IDXGUID": [b"objectUUID"],
"@IDX_DN_GUID": [b"GUID"],
})
})
except ldb.LdbError as e:
code = e.args[0]
string = e.args[1]

View File

@ -1206,7 +1206,7 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
res = self.samdb.search(base="<GUID=%s>" % guidstr, scope=ldb.SCOPE_BASE,
attrs=attrs, controls=["extended_dn:1:1", "show_recycled:1",
"reveal_internals:0"
])
])
except ldb.LdbError as e3:
(enum, estr) = e3.args
if enum != ldb.ERR_NO_SUCH_OBJECT:

View File

@ -42,7 +42,7 @@ class inf_to_kdc_tdb(gp_ext_setter):
self.mins_to_hours),
'kdc:renewal_lifetime': (self.set_kdc_tdb,
self.days_to_hours),
}
}
def __str__(self):
return 'Kerberos Policy'
@ -100,7 +100,7 @@ class inf_to_ldb(gp_ext_setter):
"minPwdLength" : (self.ch_minPwdLength, self.explicit),
"pwdProperties" : (self.ch_pwdProperties, self.explicit),
}
}
def __str__(self):
return 'System Access'
@ -135,7 +135,7 @@ class gp_sec_ext(gp_inf_ext):
inf_to_ldb),
"PasswordComplexity": ("pwdProperties",
inf_to_ldb),
},
},
"Kerberos Policy": {"MaxTicketAge": (
"kdc:user_ticket_lifetime",
inf_to_kdc_tdb
@ -148,6 +148,6 @@ class gp_sec_ext(gp_inf_ext):
"kdc:renewal_lifetime",
inf_to_kdc_tdb
),
}
}
}
}

View File

@ -229,7 +229,7 @@ def compile_graph_key(key_items, nodes_above=[], elisions=None,
elision_str,
';\n'.join(above_lines),
' -> '.join(order_lines),
))
))
return s
@ -405,7 +405,7 @@ COLOUR_SETS = {
colour.xterm_256_colour(220),
colour.xterm_256_colour(214),
colour.xterm_256_colour(208),
),
),
'header': colour.UNDERLINE,
'reset': colour.C_NORMAL,
},
@ -422,7 +422,7 @@ COLOUR_SETS = {
colour.xterm_256_colour(220, bg=True),
colour.xterm_256_colour(214, bg=True),
colour.xterm_256_colour(208, bg=True),
),
),
'header': colour.UNDERLINE,
'reset': colour.C_NORMAL,
},
@ -605,7 +605,7 @@ def distance_matrix(vertices, edges,
horizontal * j,
v,
c_reset
))
))
verticals += c + vertical
connections = find_transitive_distance(vertices, edges)
@ -768,7 +768,7 @@ def full_matrix(rows,
horizontal * j,
v,
c_reset
))
))
verticals += '%s%s' % (c, vertical)
end_cell = '%s%s' % (' ' * use_padding, c_reset)

View File

@ -857,7 +857,7 @@ class DCJoinContext(object):
use_ntvfs=ctx.use_ntvfs, dns_backend=ctx.dns_backend,
plaintext_secrets=ctx.plaintext_secrets,
backend_store=ctx.backend_store
)
)
print("Provision OK for domain DN %s" % presult.domaindn)
ctx.local_samdb = presult.samdb
ctx.lp = presult.lp

View File

@ -461,7 +461,7 @@ class cmd_fsmo_show(Command):
(naming_dn, "naming", "DomainNamingMasterRole"),
(domaindns_dn, "domaindns", "DomainDnsZonesMasterRole"),
(forestdns_dn, "forestdns", "ForestDnsZonesMasterRole"),
]
]
for master in masters:
(dn, short_name, long_name) = master

View File

@ -503,7 +503,7 @@ class cmd_ntdsconn(GraphCommand):
# XXX can't be critical for ldif test
#controls=["search_options:1:2"],
controls=["search_options:0:2"],
)
)
for msg in res:
msgdn = str(msg.dn)

View File

@ -252,7 +252,7 @@ class TestCase(unittest.TestCase):
"a diff follows\n"
% ('when stripped ' if strip else '',
len(a), len(b),
))
))
from difflib import unified_diff
diff = unified_diff(a.splitlines(True),

View File

@ -82,7 +82,7 @@ class SitesSubnetCmdTestCase(BaseSitesCmdTestCase):
("50.62.1.2/32", self.sitename), # single IP
("aaaa:bbbb:cccc:dddd:eeee:ffff:2222:1100/120",
self.sitename2),
)
)
for cidr, sitename in cidrs:
result, out, err = self.runsubcmd("sites", "subnet", "create",
@ -118,7 +118,7 @@ class SitesSubnetCmdTestCase(BaseSitesCmdTestCase):
("7.0.0.0.0/0", self.sitename), # insufficient zeros
("aaaa:bbbb:cccc:dddd:eeee:ffff:2222:1100/119",
self.sitename), # insufficient zeros
)
)
for cidr, sitename in cidrs:
result, out, err = self.runsubcmd("sites", "subnet", "create",

View File

@ -201,7 +201,7 @@ class UserTests(samba.tests.TestCase):
def _test_indexed_search(self):
expressions = ['(objectclass=group)',
'(samaccountname=Administrator)'
]
]
for expression in expressions:
t = time.time()
for i in range(4000):

View File

@ -168,7 +168,7 @@ class UserTests(samba.tests.TestCase):
def _test_indexed_search(self):
expressions = ['(objectclass=group)',
'(samaccountname=Administrator)'
]
]
for expression in expressions:
t = time.time()
for i in range(100):

View File

@ -162,7 +162,7 @@ class UserTests(samba.tests.TestCase):
def _test_indexed_search(self):
expressions = ['(objectclass=group)',
'(samaccountname=Administrator)'
]
]
for expression in expressions:
t = time.time()
for i in range(10000):

View File

@ -1974,7 +1974,7 @@ delete: description
"objectClass": "computer",
"cn": "ldaptestcomputer3",
"sAMAccountType": str(ATYPE_NORMAL_ACCOUNT)
})
})
self.fail()
except LdbError as e95:
(num, _) = e95.args

View File

@ -347,7 +347,7 @@ class LATests(samba.tests.TestCase):
show_recycled=1,
show_deactivated_link=0,
reveal_internals=0
)
)
def test_la_links_delete_link_reveal(self):
if opts.no_reveal_internals:

View File

@ -728,7 +728,7 @@ class VLVTests(samba.tests.TestCase):
int(round((n_users - 1) *
(offset - 1) /
(denominator - 1.0)))
)
)
self.assertCorrectResults(results, full_results,
real_offset, before,
@ -803,7 +803,7 @@ class VLVTests(samba.tests.TestCase):
'name',
'whenChanged',
'usnChanged'
]
]
# add some deleted users first, just in case there are none
self.add_deleted_users(6)
@ -832,8 +832,8 @@ class VLVTests(samba.tests.TestCase):
"vlv:1:%d:%d:%d:0" %
(before, after,
offset)
]
)
]
)
results = [x[attr][0] for x in res]
self.assertCorrectResults(results, expected_order,
offset, before, after)
@ -846,7 +846,7 @@ class VLVTests(samba.tests.TestCase):
'sAMAccountName',
'objectSid',
'whenChanged',
]
]
# add some deleted users first, just in case there are none
self.add_deleted_users(4)
@ -891,7 +891,7 @@ class VLVTests(samba.tests.TestCase):
'name',
'whenChanged',
'usnChanged'
]
]
self.add_deleted_users(6)
random.seed(23)
for attr in attrs:

View File

@ -1086,7 +1086,7 @@ for env in [
environ={'TEST_SERVER': '$SERVER', 'TEST_USERNAME': '$USERNAME',
'TEST_PASSWORD': '$PASSWORD',
'TEST_ENV': env
},
},
extra_path=[os.path.join(srcdir(), "samba/python"), ]
)
planpythontestsuite(env, "samba.tests.samba_tool.visualize_drs")