diff options
36 files changed, 72 insertions, 73 deletions
diff --git a/src/mailman/app/moderator.py b/src/mailman/app/moderator.py index 335c7a409..2f8c19cfc 100644 --- a/src/mailman/app/moderator.py +++ b/src/mailman/app/moderator.py @@ -240,7 +240,7 @@ def send_rejection(mlist, request, recip, comment, origmsg=None, lang=None): # As this message is going to the requester, try to set the language to # his/her language choice, if they are a member. Otherwise use the list's # preferred language. - display_name = mlist.display_name # flake8: noqa + display_name = mlist.display_name # noqa if lang is None: member = mlist.members.get_member(recip) lang = (mlist.preferred_language diff --git a/src/mailman/app/notifications.py b/src/mailman/app/notifications.py index 09d5d2bc8..04a56b55d 100644 --- a/src/mailman/app/notifications.py +++ b/src/mailman/app/notifications.py @@ -91,7 +91,7 @@ def send_welcome_message(mlist, member, language, text=''): user_address=member.address.email, user_options_uri=options_url, )) - digmode = ('' # flake8: noqa + digmode = ('' # noqa if member.delivery_mode is DeliveryMode.regular else _(' (Digest mode)')) msg = UserNotification( diff --git a/src/mailman/app/registrar.py b/src/mailman/app/registrar.py index ca2804f5d..541006f4b 100644 --- a/src/mailman/app/registrar.py +++ b/src/mailman/app/registrar.py @@ -87,10 +87,10 @@ def handle_ConfirmationNeededEvent(event): subject = 'confirm ' + event.token confirm_address = event.mlist.confirm_address(event.token) # For i18n interpolation. - confirm_url = event.mlist.domain.confirm_url(event.token) # flake8: noqa + confirm_url = event.mlist.domain.confirm_url(event.token) # noqa email_address = event.email - domain_name = event.mlist.domain.mail_host # flake8: noqa - contact_address = event.mlist.owner_address # flake8: noqa + domain_name = event.mlist.domain.mail_host # noqa + contact_address = event.mlist.owner_address # noqa # Send a verification email to the address. template = getUtility(ITemplateLoader).get( 'mailman:///{}/{}/confirm.txt'.format( diff --git a/src/mailman/app/subscriptions.py b/src/mailman/app/subscriptions.py index ca7ede14f..d72002b49 100644 --- a/src/mailman/app/subscriptions.py +++ b/src/mailman/app/subscriptions.py @@ -223,7 +223,7 @@ class SubscriptionWorkflow(Workflow): next_step = ( 'moderation_checks' if self.mlist.subscription_policy is - SubscriptionPolicy.confirm_then_moderate # flake8: noqa + SubscriptionPolicy.confirm_then_moderate # noqa else 'do_subscription') self.push(next_step) return diff --git a/src/mailman/bin/master.py b/src/mailman/bin/master.py index 77caf6966..bc74ea6a5 100644 --- a/src/mailman/bin/master.py +++ b/src/mailman/bin/master.py @@ -193,7 +193,7 @@ The master lock could not be acquired because it appears as though another master is already running.""") elif status is WatcherState.stale_lock: # Hostname matches but the process does not exist. - program = sys.argv[0] # flake8: noqa + program = sys.argv[0] # noqa message = _("""\ The master lock could not be acquired. It appears as though there is a stale master lock. Try re-running $program with the --force flag.""") @@ -299,33 +299,33 @@ class Loop: # Set up our signal handlers. Also set up a SIGALRM handler to # refresh the lock once per day. The lock lifetime is 1 day + 6 hours # so this should be plenty. - def sigalrm_handler(signum, frame): # flake8: noqa + def sigalrm_handler(signum, frame): # noqa self._lock.refresh() signal.alarm(SECONDS_IN_A_DAY) signal.signal(signal.SIGALRM, sigalrm_handler) signal.alarm(SECONDS_IN_A_DAY) # SIGHUP tells the runners to close and reopen their log files. - def sighup_handler(signum, frame): # flake8: noqa + def sighup_handler(signum, frame): # noqa reopen() for pid in self._kids: os.kill(pid, signal.SIGHUP) log.info('Master watcher caught SIGHUP. Re-opening log files.') signal.signal(signal.SIGHUP, sighup_handler) # SIGUSR1 is used by 'mailman restart'. - def sigusr1_handler(signum, frame): # flake8: noqa + def sigusr1_handler(signum, frame): # noqa for pid in self._kids: os.kill(pid, signal.SIGUSR1) log.info('Master watcher caught SIGUSR1. Exiting.') signal.signal(signal.SIGUSR1, sigusr1_handler) # SIGTERM is what init will kill this process with when changing run # levels. It's also the signal 'mailman stop' uses. - def sigterm_handler(signum, frame): # flake8: noqa + def sigterm_handler(signum, frame): # noqa for pid in self._kids: os.kill(pid, signal.SIGTERM) log.info('Master watcher caught SIGTERM. Exiting.') signal.signal(signal.SIGTERM, sigterm_handler) # SIGINT is what control-C gives. - def sigint_handler(signum, frame): # flake8: noqa + def sigint_handler(signum, frame): # noqa for pid in self._kids: os.kill(pid, signal.SIGINT) log.info('Master watcher caught SIGINT. Restarting.') diff --git a/src/mailman/bin/runner.py b/src/mailman/bin/runner.py index 928365237..be41dcd96 100644 --- a/src/mailman/bin/runner.py +++ b/src/mailman/bin/runner.py @@ -187,7 +187,7 @@ def main(): for shortname in sorted(descriptions): classname = descriptions[shortname] spaces = longest - len(shortname) - name = (' ' * spaces) + shortname # flake8: noqa + name = (' ' * spaces) + shortname # noqa print(_('$name runs $classname')) sys.exit(0) diff --git a/src/mailman/chains/hold.py b/src/mailman/chains/hold.py index 329bbc71b..3a8284a78 100644 --- a/src/mailman/chains/hold.py +++ b/src/mailman/chains/hold.py @@ -163,10 +163,10 @@ class HoldChain(TerminalChainBase): bytes_subject = oneline_subject.encode(charset, 'replace') original_subject = bytes_subject.decode(charset) substitutions = dict( - listname = mlist.fqdn_listname, # flake8: noqa - subject = original_subject, # flake8: noqa - sender = msg.sender, # flake8: noqa - reasons = _compose_reasons(msgdata), # flake8: noqa + listname = mlist.fqdn_listname, # noqa + subject = original_subject, # noqa + sender = msg.sender, # noqa + reasons = _compose_reasons(msgdata), # noqa ) # At this point the message is held, but now we have to craft at least # two responses. The first will go to the original author of the diff --git a/src/mailman/chains/reject.py b/src/mailman/chains/reject.py index f0926cd8c..934b83b3d 100644 --- a/src/mailman/chains/reject.py +++ b/src/mailman/chains/reject.py @@ -64,8 +64,8 @@ reasons: The original message as received by Mailman is attached. """).format( - list_name=mlist.display_name, # flake8: noqa - reasons=NEWLINE.join(reasons) # flake8: noqa + list_name=mlist.display_name, # noqa + reasons=NEWLINE.join(reasons) # noqa )) bounce_message(mlist, msg, error) log.info('REJECT: %s', msg.get('message-id', 'n/a')) diff --git a/src/mailman/chains/tests/test_accept.py b/src/mailman/chains/tests/test_accept.py index 661ad2146..9b7a25fab 100644 --- a/src/mailman/chains/tests/test_accept.py +++ b/src/mailman/chains/tests/test_accept.py @@ -60,7 +60,7 @@ Subject: Ignore config.chains['mine'] = MyChain() self.addCleanup(config.chains.pop, 'mine') hits = None - def handler(event): # flake8: noqa + def handler(event): # noqa nonlocal hits if isinstance(event, AcceptEvent): hits = event.msg['x-mailman-rule-hits'] diff --git a/src/mailman/chains/tests/test_headers.py b/src/mailman/chains/tests/test_headers.py index b3ccdf675..246462d5f 100644 --- a/src/mailman/chains/tests/test_headers.py +++ b/src/mailman/chains/tests/test_headers.py @@ -168,7 +168,7 @@ class TestHeaderChain(unittest.TestCase): [('foo', 'a+', LinkAction.jump, 'reject'), ('bar', 'b+', LinkAction.jump, 'discard'), ('baz', 'z+', LinkAction.jump, 'accept'), - ]) # flake8: noqa + ]) # noqa @configuration('antispam', header_checks=""" Foo: foo @@ -218,7 +218,7 @@ A message body. # This event subscriber records the event that occurs when the message # is processed by the owner chain, which holds its for approval. events = [] - def record_holds(event): # flake8: noqa + def record_holds(event): # noqa if not isinstance(event, HoldEvent): return events.append(event) @@ -226,7 +226,7 @@ A message body. # Set the site-wide antispam action to hold the message. with configuration('antispam', header_checks=""" Spam: [*]{3,} - """, jump_chain='hold'): # flake8: noqa + """, jump_chain='hold'): # noqa process(self._mlist, msg, {}, start_chain='header-match') self.assertEqual(len(events), 1) event = events[0] @@ -235,7 +235,7 @@ A message body. self.assertEqual(event.mlist, self._mlist) self.assertEqual(event.msg, msg) events = [] - def record_discards(event): # flake8: noqa + def record_discards(event): # noqa if not isinstance(event, DiscardEvent): return events.append(event) @@ -244,7 +244,7 @@ A message body. msg.replace_header('Message-Id', '<bee>') with configuration('antispam', header_checks=""" Spam: [*]{3,} - """, jump_chain='discard'): # flake8: noqa + """, jump_chain='discard'): # noqa process(self._mlist, msg, {}, start_chain='header-match') self.assertEqual(len(events), 1) event = events[0] diff --git a/src/mailman/chains/tests/test_owner.py b/src/mailman/chains/tests/test_owner.py index 06ba10582..004c0200a 100644 --- a/src/mailman/chains/tests/test_owner.py +++ b/src/mailman/chains/tests/test_owner.py @@ -50,7 +50,7 @@ Message-ID: <ant> # This event subscriber records the event that occurs when the message # is processed by the owner chain. events = [] - def catch_event(event): # flake8: noqa + def catch_event(event): # noqa if isinstance(event, AcceptOwnerEvent): events.append(event) with event_subscribers(catch_event): diff --git a/src/mailman/commands/cli_control.py b/src/mailman/commands/cli_control.py index 6a90a510d..a99a62dbc 100644 --- a/src/mailman/commands/cli_control.py +++ b/src/mailman/commands/cli_control.py @@ -93,7 +93,7 @@ class Start: self.parser.error( _('A previous run of GNU Mailman did not exit ' 'cleanly. Try using --force.')) - def log(message): # flake8: noqa + def log(message): # noqa if not args.quiet: print(message) # Try to find the path to a valid, existing configuration file, and diff --git a/src/mailman/commands/cli_lists.py b/src/mailman/commands/cli_lists.py index 8720f91c5..0b077543e 100644 --- a/src/mailman/commands/cli_lists.py +++ b/src/mailman/commands/cli_lists.py @@ -89,7 +89,7 @@ class Lists: if not args.quiet: print(_('No matching mailing lists found')) return - count = len(mailing_lists) # flake8: noqa + count = len(mailing_lists) # noqa if not args.quiet: print(_('$count matching mailing lists found:')) # Calculate the longest identifier. @@ -198,8 +198,7 @@ class Create: invalid_owners = [owner for owner in args.owners if not validator.is_valid(owner)] if invalid_owners: - invalid = COMMASPACE.join( # flake8: noqa - sorted(invalid_owners)) + invalid = COMMASPACE.join(sorted(invalid_owners)) # noqa self.parser.error(_('Illegal owner addresses: $invalid')) return try: diff --git a/src/mailman/commands/cli_qfile.py b/src/mailman/commands/cli_qfile.py index c66ed85d7..0ed078ff3 100644 --- a/src/mailman/commands/cli_qfile.py +++ b/src/mailman/commands/cli_qfile.py @@ -80,7 +80,7 @@ class QFile: else: printer.pprint(obj) print(_('[----- end pickle -----]')) - count = len(m) # flake8: noqa + count = len(m) # noqa banner = _("The variable 'm' contains $count objects") if args.interactive: interact(banner=banner) diff --git a/src/mailman/commands/cli_status.py b/src/mailman/commands/cli_status.py index 7cc69850a..dae9cfe0a 100644 --- a/src/mailman/commands/cli_status.py +++ b/src/mailman/commands/cli_status.py @@ -50,7 +50,7 @@ class Status: message = _('GNU Mailman is stopped (stale pid: $pid)') else: hostname, pid, tempfile = lock.details - fqdn_name = socket.getfqdn() # flake8: noqa + fqdn_name = socket.getfqdn() # noqa assert status is WatcherState.host_mismatch, ( 'Invalid enum value: %s' % status) message = _('GNU Mailman is in an unexpected state ' diff --git a/src/mailman/commands/cli_withlist.py b/src/mailman/commands/cli_withlist.py index e7329f4e7..492391c7b 100644 --- a/src/mailman/commands/cli_withlist.py +++ b/src/mailman/commands/cli_withlist.py @@ -159,7 +159,7 @@ class Withlist: def _start_python(self, overrides, banner): # Set the tab completion. try: - import readline, rlcompleter # flake8: noqa + import readline, rlcompleter # noqa readline.parse_and_bind('tab: complete') except ImportError: pass diff --git a/src/mailman/commands/eml_help.py b/src/mailman/commands/eml_help.py index 8df4c666a..8166effea 100644 --- a/src/mailman/commands/eml_help.py +++ b/src/mailman/commands/eml_help.py @@ -66,7 +66,7 @@ class Help: print(wrap(command.description), file=results) return ContinueProcessing.yes else: - printable_arguments = SPACE.join(arguments) # flake8: noqa + printable_arguments = SPACE.join(arguments) # noqa print(_('$self.name: too many arguments: $printable_arguments'), file=results) return ContinueProcessing.no diff --git a/src/mailman/commands/eml_membership.py b/src/mailman/commands/eml_membership.py index 4f8e62a69..8168e98fa 100644 --- a/src/mailman/commands/eml_membership.py +++ b/src/mailman/commands/eml_membership.py @@ -92,7 +92,7 @@ used. return ContinueProcessing.yes joins.add(email) results.joins = joins - person = formataddr((display_name, email)) # flake8: noqa + person = formataddr((display_name, email)) # noqa # Is this person already a member of the list? Search for all # matching memberships. members = getUtility(ISubscriptionService).find_members( @@ -187,7 +187,7 @@ You may be asked to confirm your request.""") file=results) return ContinueProcessing.no member.unsubscribe() - person = formataddr((user.display_name, email)) # flake8: noqa + person = formataddr((user.display_name, email)) # noqa print(_('$person left $mlist.fqdn_listname'), file=results) return ContinueProcessing.yes diff --git a/src/mailman/config/tests/test_configuration.py b/src/mailman/config/tests/test_configuration.py index a969ce586..a64b85ca0 100644 --- a/src/mailman/config/tests/test_configuration.py +++ b/src/mailman/config/tests/test_configuration.py @@ -39,7 +39,7 @@ class TestConfiguration(unittest.TestCase): # Pushing a new configuration onto the stack triggers a # post-processing event. events = [] - def on_event(event): # flake8: noqa + def on_event(event): # noqa if isinstance(event, ConfigurationUpdatedEvent): # Record both the event and the top overlay. events.append(event.config.overlays[0].name) diff --git a/src/mailman/database/postgresql.py b/src/mailman/database/postgresql.py index a09ee3038..5d42c59f8 100644 --- a/src/mailman/database/postgresql.py +++ b/src/mailman/database/postgresql.py @@ -41,8 +41,8 @@ class PostgreSQLDatabase(SABaseDatabase): for table in tables: for column in table.primary_key: if (column.autoincrement - and isinstance(column.type, Integer) # flake8: noqa - and not column.foreign_keys): # flake8: noqa + and isinstance(column.type, Integer) # noqa + and not column.foreign_keys): # noqa store.execute("""\ SELECT setval('"{0}_{1}_seq"', coalesce(max("{1}"), 1), max("{1}") IS NOT null) diff --git a/src/mailman/database/sqlite.py b/src/mailman/database/sqlite.py index e36b2ba75..409545d74 100644 --- a/src/mailman/database/sqlite.py +++ b/src/mailman/database/sqlite.py @@ -37,7 +37,7 @@ class SQLiteDatabase(SABaseDatabase): path = os.path.normpath(parts.path) fd = os.open( path, - os.O_WRONLY | os.O_NONBLOCK | os.O_CREAT, # flake8: noqa + os.O_WRONLY | os.O_NONBLOCK | os.O_CREAT, # noqa 0o666) # Ignore errors if fd > 0: diff --git a/src/mailman/handlers/cook_headers.py b/src/mailman/handlers/cook_headers.py index ed4c28c8c..5b015b51c 100644 --- a/src/mailman/handlers/cook_headers.py +++ b/src/mailman/handlers/cook_headers.py @@ -98,7 +98,7 @@ def process(mlist, msg, msgdata): # A convenience function, requires nested scopes. pair is (name, addr) new = [] d = {} - def add(pair): # flake8: noqa + def add(pair): # noqa lcaddr = pair[1].lower() if lcaddr in d: return diff --git a/src/mailman/model/tests/test_domain.py b/src/mailman/model/tests/test_domain.py index 3ebcb562e..dc0d3b5bf 100644 --- a/src/mailman/model/tests/test_domain.py +++ b/src/mailman/model/tests/test_domain.py @@ -122,7 +122,7 @@ class TestDomainManager(unittest.TestCase): self.assertEqual( sorted(owner.addresses[0].email for owner in domain.owners), ['anne@example.com', 'bart@example.com']) - def sort_key(owner): # flake8: noqa + def sort_key(owner): # noqa return owner.addresses[0].email self.assertEqual(sorted(domain.owners, key=sort_key), [anne, bart]) diff --git a/src/mailman/mta/deliver.py b/src/mailman/mta/deliver.py index fdd564946..d1f87db07 100644 --- a/src/mailman/mta/deliver.py +++ b/src/mailman/mta/deliver.py @@ -90,15 +90,15 @@ def deliver(mlist, msg, msgdata): if size is None: size = len(msg.as_string()) substitutions = dict( - msgid = msg.get('message-id', 'n/a'), # flake8: noqa - listname = mlist.fqdn_listname, # flake8: noqa - sender = original_sender, # flake8: noqa - recip = len(original_recipients), # flake8: noqa - size = size, # flake8: noqa - time = t1 - t0, # flake8: noqa - refused = len(refused), # flake8: noqa - smtpcode = 'n/a', # flake8: noqa - smtpmsg = 'n/a', # flake8: noqa + msgid = msg.get('message-id', 'n/a'), # noqa + listname = mlist.fqdn_listname, # noqa + sender = original_sender, # noqa + recip = len(original_recipients), # noqa + size = size, # noqa + time = t1 - t0, # noqa + refused = len(refused), # noqa + smtpcode = 'n/a', # noqa + smtpmsg = 'n/a', # noqa ) template = config.logging.smtp.every if template.lower() != 'no': @@ -141,9 +141,9 @@ def deliver(mlist, msg, msgdata): template = config.logging.smtp.failure if template.lower() != 'no': substitutions.update( - recip = recipient, # flake8: noqa - smtpcode = code, # flake8: noqa - smtpmsg = smtp_message, # flake8: noqa + recip = recipient, # noqa + smtpcode = code, # noqa + smtpmsg = smtp_message, # noqa ) log.info('%s', expand(template, substitutions)) # Return the results diff --git a/src/mailman/rest/tests/test_paginate.py b/src/mailman/rest/tests/test_paginate.py index ad9fb0d2a..cd8b2217e 100644 --- a/src/mailman/rest/tests/test_paginate.py +++ b/src/mailman/rest/tests/test_paginate.py @@ -48,7 +48,7 @@ class TestPaginateHelper(unittest.TestCase): class Resource(CollectionMixin): def _get_collection(self, request): return ['one', 'two', 'three', 'four', 'five'] - def _resource_as_dict(self, res): # flake8: noqa + def _resource_as_dict(self, res): # noqa return {'value': res} return Resource() diff --git a/src/mailman/rest/users.py b/src/mailman/rest/users.py index 6ac4462c8..19ebba413 100644 --- a/src/mailman/rest/users.py +++ b/src/mailman/rest/users.py @@ -54,7 +54,7 @@ class ListOfDomainOwners(GetterSetter): def get(self, domain, attribute): assert attribute == 'owner', ( 'Unexpected attribute: {}'.format(attribute)) - def sort_key(owner): # flake8: noqa + def sort_key(owner): # noqa return owner.addresses[0].email return sorted(domain.owners, key=sort_key) diff --git a/src/mailman/rules/moderation.py b/src/mailman/rules/moderation.py index d3dc07a8f..806ceae39 100644 --- a/src/mailman/rules/moderation.py +++ b/src/mailman/rules/moderation.py @@ -109,7 +109,7 @@ class NonmemberModeration: checklist = getattr(mlist, legacy_attribute_name) for addr in checklist: if ((addr.startswith('^') and re.match(addr, sender)) - or addr == sender): # flake8: noqa + or addr == sender): # noqa # The reason will get translated at the point of use. reason = 'The sender is in the nonmember {} list' _record_action(msgdata, action, sender, diff --git a/src/mailman/runners/command.py b/src/mailman/runners/command.py index 15ccca438..13d52ce75 100644 --- a/src/mailman/runners/command.py +++ b/src/mailman/runners/command.py @@ -168,9 +168,9 @@ class CommandRunner(Runner): # Include just a few key pieces of information from the original: the # sender, date, and message id. print(_('- Original message details:'), file=results) - subject = msg.get('subject', 'n/a') # flake8: noqa - date = msg.get('date', 'n/a') # flake8: noqa - from_ = msg.get('from', 'n/a') # flake8: noqa + subject = msg.get('subject', 'n/a') # noqa + date = msg.get('date', 'n/a') # noqa + from_ = msg.get('from', 'n/a') # noqa print(_(' From: $from_'), file=results) print(_(' Subject: $subject'), file=results) print(_(' Date: $date'), file=results) diff --git a/src/mailman/runners/rest.py b/src/mailman/runners/rest.py index 5a76d22c1..0100b0db9 100644 --- a/src/mailman/runners/rest.py +++ b/src/mailman/runners/rest.py @@ -50,7 +50,7 @@ class RESTRunner(Runner): # server. self._server = make_server() self._event = threading.Event() - def stopper(event, server): # flake8: noqa + def stopper(event, server): # noqa event.wait() server.shutdown() self._thread = threading.Thread( diff --git a/src/mailman/testing/helpers.py b/src/mailman/testing/helpers.py index 302198396..cb5bb8d28 100644 --- a/src/mailman/testing/helpers.py +++ b/src/mailman/testing/helpers.py @@ -251,7 +251,7 @@ def get_nntp_server(cleanups): cleanups.append(patcher.stop) nntpd = server_class() # A class for more convenient access to the posted message. - class NNTPProxy: # flake8: noqa + class NNTPProxy: # noqa def get_message(self): args = nntpd.post.call_args return specialized_message_from_string(args[0][0].read()) diff --git a/src/mailman/testing/nose.py b/src/mailman/testing/nose.py index 0a5608c7a..f88ac409a 100644 --- a/src/mailman/testing/nose.py +++ b/src/mailman/testing/nose.py @@ -42,7 +42,7 @@ class NosePlugin(Plugin): super().__init__() self.patterns = [] self.stderr = False - def set_stderr(ignore): # flake8: noqa + def set_stderr(ignore): # noqa self.stderr = True self.addArgument(self.patterns, 'P', 'pattern', 'Add a test matching pattern') diff --git a/src/mailman/tests/test_configfile.py b/src/mailman/tests/test_configfile.py index 79adcdd3e..2d418bb54 100644 --- a/src/mailman/tests/test_configfile.py +++ b/src/mailman/tests/test_configfile.py @@ -129,7 +129,7 @@ class TestConfigFileSearchWithChroot(TestConfigFileBase): # system that we can write to and test is to hack os.path.exists() to # prepend a temporary directory onto the path it tests. self._os_path_exists = os.path.exists - def exists(path): # flake8: noqa + def exists(path): # noqa # Strip off the leading slash, otherwise we'll end up with path. return self._os_path_exists(self._make_fake(path)) os.path.exists = exists diff --git a/src/mailman/utilities/interact.py b/src/mailman/utilities/interact.py index 609fe78fb..a28af7c7c 100644 --- a/src/mailman/utilities/interact.py +++ b/src/mailman/utilities/interact.py @@ -52,7 +52,7 @@ def interact(upframe=True, banner=DEFAULT_BANNER, overrides=None): interp = code.InteractiveConsole(namespace) # Try to import the readline module, but don't worry if it's unavailable. try: - import readline # flake8: noqa + import readline # noqa except ImportError: pass # Mimic the real interactive interpreter's loading of any $PYTHONSTARTUP diff --git a/src/mailman/utilities/tests/test_templates.py b/src/mailman/utilities/tests/test_templates.py index 9fb0aaa16..c2f7dd59a 100644 --- a/src/mailman/utilities/tests/test_templates.py +++ b/src/mailman/utilities/tests/test_templates.py @@ -77,7 +77,7 @@ class TestSearchOrder(unittest.TestCase): def test_fully_specified_search_order(self): search_order = self._stripped_search_order('foo.txt', self.mlist, 'it') # For convenience. - def nexteq(path): # flake8: noqa + def nexteq(path): # noqa self.assertEqual(next(search_order), path) # 1: Use the given language argument nexteq('/v/templates/lists/l.example.com/it/foo.txt') @@ -132,7 +132,7 @@ class TestSearchOrder(unittest.TestCase): def test_no_mailing_list_argument_search_order(self): search_order = self._stripped_search_order('foo.txt', language='it') # For convenience. - def nexteq(path): # flake8: noqa + def nexteq(path): # noqa self.assertEqual(next(search_order), path) # 1: Use the given language argument nexteq('/v/templates/site/it/foo.txt') @@ -148,7 +148,7 @@ class TestSearchOrder(unittest.TestCase): def test_no_optional_arguments_search_order(self): search_order = self._stripped_search_order('foo.txt') # For convenience. - def nexteq(path): # flake8: noqa + def nexteq(path): # noqa self.assertEqual(next(search_order), path) # 1: Use the site's default language nexteq('/v/templates/site/fr/foo.txt') @@ -180,7 +180,7 @@ class TestFind(unittest.TestCase): self.mlist.preferred_language = 'xx' self.fp = None # Populate the template directories with a few fake templates. - def write(text, path): # flake8: noqa + def write(text, path): # noqa os.makedirs(os.path.dirname(path)) with open(path, 'w') as fp: fp.write(text) diff --git a/src/mailman/utilities/tests/test_uid.py b/src/mailman/utilities/tests/test_uid.py index 0ee53a211..c081ac2c5 100644 --- a/src/mailman/utilities/tests/test_uid.py +++ b/src/mailman/utilities/tests/test_uid.py @@ -54,7 +54,7 @@ class TestUID(unittest.TestCase): def test_uid_record_try_again(self): called = False - def record_second(ignore): # flake8: noqa + def record_second(ignore): # noqa nonlocal called if not called: called = True diff --git a/src/mailman/version.py b/src/mailman/version.py index 229bb7fba..6a86a5768 100644 --- a/src/mailman/version.py +++ b/src/mailman/version.py @@ -23,10 +23,10 @@ CODENAME = 'Between The Wheels' # And as a hex number in the manner of PY_VERSION_HEX. ALPHA = 0xa -BETA = 0xb # flake8: noqa +BETA = 0xb # noqa GAMMA = 0xc # Release candidates. -RC = GAMMA # flake8: noqa +RC = GAMMA # noqa FINAL = 0xf MAJOR_REV = 3 @@ -37,7 +37,7 @@ REL_LEVEL = ALPHA REL_SERIAL = 1 HEX_VERSION = ((MAJOR_REV << 24) | (MINOR_REV << 16) | (MICRO_REV << 8) | - (REL_LEVEL << 4) | (REL_SERIAL << 0)) # flake8: noqa + (REL_LEVEL << 4) | (REL_SERIAL << 0)) # noqa # queue/*.pck schema version number. |
