From: Joe Guo Date: Mon, 30 Jul 2018 06:14:43 +0000 (+1200) Subject: PEP8: fix E124: closing bracket does not match visual indentation X-Git-Tag: tdb-1.3.17~2077 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dba0c7ebe5e91a6124e48a62a28f460c2fc9bf79;p=thirdparty%2Fsamba.git PEP8: fix E124: closing bracket does not match visual indentation Signed-off-by: Joe Guo Reviewed-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- diff --git a/lib/ldb/tests/python/index.py b/lib/ldb/tests/python/index.py index 2613a4dbedd..4837d256f2d 100755 --- a/lib/ldb/tests/python/index.py +++ b/lib/ldb/tests/python/index.py @@ -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] diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py index 77de06ad0eb..d239fe7a8e3 100644 --- a/python/samba/dbchecker.py +++ b/python/samba/dbchecker.py @@ -1206,7 +1206,7 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base))) res = self.samdb.search(base="" % 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: diff --git a/python/samba/gp_sec_ext.py b/python/samba/gp_sec_ext.py index dcf9ed29d81..e06fb557c7e 100644 --- a/python/samba/gp_sec_ext.py +++ b/python/samba/gp_sec_ext.py @@ -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 ), - } - } + } + } diff --git a/python/samba/graph.py b/python/samba/graph.py index e80a8820667..06d19960f64 100644 --- a/python/samba/graph.py +++ b/python/samba/graph.py @@ -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) diff --git a/python/samba/join.py b/python/samba/join.py index 5b32e2f2d01..c2b89ada873 100644 --- a/python/samba/join.py +++ b/python/samba/join.py @@ -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 diff --git a/python/samba/netcmd/fsmo.py b/python/samba/netcmd/fsmo.py index 6d32a25cf9e..c31fc6735b5 100644 --- a/python/samba/netcmd/fsmo.py +++ b/python/samba/netcmd/fsmo.py @@ -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 diff --git a/python/samba/netcmd/visualize.py b/python/samba/netcmd/visualize.py index a24962ea58a..2ec2670df0b 100644 --- a/python/samba/netcmd/visualize.py +++ b/python/samba/netcmd/visualize.py @@ -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) diff --git a/python/samba/tests/__init__.py b/python/samba/tests/__init__.py index 97ce8d1c495..603a7699420 100644 --- a/python/samba/tests/__init__.py +++ b/python/samba/tests/__init__.py @@ -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), diff --git a/python/samba/tests/samba_tool/sites.py b/python/samba/tests/samba_tool/sites.py index 36948257b08..228f28d9272 100644 --- a/python/samba/tests/samba_tool/sites.py +++ b/python/samba/tests/samba_tool/sites.py @@ -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", diff --git a/source4/dsdb/tests/python/ad_dc_medley_performance.py b/source4/dsdb/tests/python/ad_dc_medley_performance.py index 05be482cf61..9ea1b6aac7c 100644 --- a/source4/dsdb/tests/python/ad_dc_medley_performance.py +++ b/source4/dsdb/tests/python/ad_dc_medley_performance.py @@ -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): diff --git a/source4/dsdb/tests/python/ad_dc_performance.py b/source4/dsdb/tests/python/ad_dc_performance.py index c7269220406..f378fb2bd08 100644 --- a/source4/dsdb/tests/python/ad_dc_performance.py +++ b/source4/dsdb/tests/python/ad_dc_performance.py @@ -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): diff --git a/source4/dsdb/tests/python/ad_dc_search_performance.py b/source4/dsdb/tests/python/ad_dc_search_performance.py index 2b8c52edf76..7911f20564e 100644 --- a/source4/dsdb/tests/python/ad_dc_search_performance.py +++ b/source4/dsdb/tests/python/ad_dc_search_performance.py @@ -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): diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py index f3b64d66f2c..73b93d42a80 100755 --- a/source4/dsdb/tests/python/ldap.py +++ b/source4/dsdb/tests/python/ldap.py @@ -1974,7 +1974,7 @@ delete: description "objectClass": "computer", "cn": "ldaptestcomputer3", "sAMAccountType": str(ATYPE_NORMAL_ACCOUNT) - }) + }) self.fail() except LdbError as e95: (num, _) = e95.args diff --git a/source4/dsdb/tests/python/linked_attributes.py b/source4/dsdb/tests/python/linked_attributes.py index 8586fb81528..58876680d86 100644 --- a/source4/dsdb/tests/python/linked_attributes.py +++ b/source4/dsdb/tests/python/linked_attributes.py @@ -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: diff --git a/source4/dsdb/tests/python/vlv.py b/source4/dsdb/tests/python/vlv.py index 5c71fda666b..3018efe7d31 100644 --- a/source4/dsdb/tests/python/vlv.py +++ b/source4/dsdb/tests/python/vlv.py @@ -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: diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index 9645416e941..fcf3c1fee8c 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -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")