Barry Warsaw pushed to branch issue255 at mailman / Mailman
Commits: 99671bec by Barry Warsaw at 2017-01-26T19:56:34-05:00 Enforce a stricter coding style. - - - - - ba08609f by Barry Warsaw at 2017-01-28T17:35:51+00:00 Merge branch 'brace-style' into 'master' Enforce a stricter coding style See merge request !237 - - - - - 91e99645 by Barry Warsaw at 2017-01-28T13:23:39-05:00 Merge branch 'master' into issue255. - - - - - 6 changed files: - src/mailman/database/tests/test_migrations.py - src/mailman/rest/tests/test_addresses.py - src/mailman/rest/tests/test_header_matches.py - src/mailman/rest/users.py - src/mailman/utilities/tests/test_import.py - tox.ini Changes: ===================================== src/mailman/database/tests/test_migrations.py ===================================== --- a/src/mailman/database/tests/test_migrations.py +++ b/src/mailman/database/tests/test_migrations.py @@ -135,9 +135,9 @@ class TestMigrations(unittest.TestCase): for i in range(1, 6): query = sa.sql.select( [keyvalue_table.c.key, keyvalue_table.c.value] - ).where( - keyvalue_table.c.pended_id == i - ) + ).where( + keyvalue_table.c.pended_id == i + ) results[i] = dict([ (r['key'], r['value']) for r in config.db.store.execute(query).fetchall() ===================================== src/mailman/rest/tests/test_addresses.py ===================================== --- a/src/mailman/rest/tests/test_addresses.py +++ b/src/mailman/rest/tests/test_addresses.py @@ -363,7 +363,7 @@ class TestAddresses(unittest.TestCase): call_api( 'http://localhost:9001/3.0/addresses/a...@example.com/user', { 'email': 'anne.per...@example.org', - }) + }) self.assertEqual(cm.exception.code, 409) def test_user_subresource_post_new_user_no_auto_create(self): @@ -377,7 +377,7 @@ class TestAddresses(unittest.TestCase): 'http://localhost:9001/3.0/addresses/a...@example.com/user', { 'display_name': 'Anne', 'auto_create': 0, - }) + }) self.assertEqual(cm.exception.code, 403) def test_user_subresource_post_no_such_user(self): ===================================== src/mailman/rest/tests/test_header_matches.py ===================================== --- a/src/mailman/rest/tests/test_header_matches.py +++ b/src/mailman/rest/tests/test_header_matches.py @@ -60,7 +60,7 @@ class TestHeaderMatches(unittest.TestCase): '/header-matches', { 'header': 'header', 'pattern': 'pattern', - }) + }) self.assertEqual(cm.exception.code, 400) self.assertEqual(cm.exception.reason, b'This header match already exists') ===================================== src/mailman/rest/users.py ===================================== --- a/src/mailman/rest/users.py +++ b/src/mailman/rest/users.py @@ -131,7 +131,7 @@ class _UserBase(CollectionMixin): is_server_owner=user.is_server_owner, self_link=self.api.path_to('users/{}'.format(user_id)), user_id=user_id, - ) + ) # Add the password attribute, only if the user has a password. Same # with the real name. These could be None or the empty string. if user.password: ===================================== src/mailman/utilities/tests/test_import.py ===================================== --- a/src/mailman/utilities/tests/test_import.py +++ b/src/mailman/utilities/tests/test_import.py @@ -774,55 +774,55 @@ class TestRosterImport(unittest.TestCase): 'members': { 'a...@example.com': 0, 'b...@example.com': b'b...@example.com', - }, + }, 'digest_members': { 'ci...@example.com': 0, 'd...@example.com': b'd...@example.com', - }, + }, 'passwords': { 'a...@example.com': b'annepass', 'b...@example.com': b'bobpass', 'ci...@example.com': b'cindypass', 'd...@example.com': b'davepass', - }, + }, 'language': { 'a...@example.com': b'fr', 'b...@example.com': b'de', 'ci...@example.com': b'es', 'd...@example.com': b'it', - }, + }, # Usernames are unicode strings in the pickle 'usernames': { 'a...@example.com': 'Anne', 'b...@example.com': 'Bob', 'ci...@example.com': 'Cindy', 'd...@example.com': 'Dave', - }, + }, 'owner': [ 'a...@example.com', 'em...@example.com', - ], + ], 'moderator': [ 'b...@example.com', 'f...@example.com', - ], + ], 'accept_these_nonmembers': [ 'g...@example.com', '^gene-.*@example.com', - ], + ], 'hold_these_nonmembers': [ 'ho...@example.com', '^homer-.*@example.com', - ], + ], 'reject_these_nonmembers': [ 'i...@example.com', '^iris-.*@example.com', - ], + ], 'discard_these_nonmembers': [ 'ke...@example.com', '^kenny-.*@example.com', - ], - } + ], + } self._usermanager = getUtility(IUserManager) language_manager = getUtility(ILanguageManager) for code in self._pckdict['language'].values(): ===================================== tox.ini ===================================== --- a/tox.ini +++ b/tox.ini @@ -51,7 +51,8 @@ rcfile = {toxinidir}/coverage.ini rc = --rcfile={[coverage]rcfile} [flake8] -max-line-length = 79 +enable-extensions = U4 exclude = src/mailman/compat/*.py +hang-closing = True jobs = 1 -enable-extensions = U4 +max-line-length = 79 View it on GitLab: https://gitlab.com/mailman/mailman/compare/7c97e8fbdb90a1a0de1526d7a6f108e95415d6a0...91e99645ca80185a30a84744cef441bba96cf6a8
_______________________________________________ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org