summaryrefslogtreecommitdiff
path: root/src/mailman/commands
diff options
context:
space:
mode:
authorBarry Warsaw2016-07-28 23:10:56 -0400
committerBarry Warsaw2016-07-28 23:10:56 -0400
commit90e84bee5f47cbcdb9e9c367c60a877e325ef3e7 (patch)
treebb7d2df3af049c6e84d65fd25cc0258b6af6ebb9 /src/mailman/commands
parent86b25ba2e3bac0e034235d322c7c77080d737833 (diff)
downloadmailman-90e84bee5f47cbcdb9e9c367c60a877e325ef3e7.tar.gz
mailman-90e84bee5f47cbcdb9e9c367c60a877e325ef3e7.tar.zst
mailman-90e84bee5f47cbcdb9e9c367c60a877e325ef3e7.zip
Diffstat (limited to 'src/mailman/commands')
-rw-r--r--src/mailman/commands/cli_control.py2
-rw-r--r--src/mailman/commands/cli_lists.py4
-rw-r--r--src/mailman/commands/cli_qfile.py2
-rw-r--r--src/mailman/commands/cli_status.py2
-rw-r--r--src/mailman/commands/cli_withlist.py2
-rw-r--r--src/mailman/commands/eml_help.py2
-rw-r--r--src/mailman/commands/eml_membership.py4
-rw-r--r--src/mailman/commands/tests/test_shell.py2
8 files changed, 10 insertions, 10 deletions
diff --git a/src/mailman/commands/cli_control.py b/src/mailman/commands/cli_control.py
index a99a62dbc..af22c3b06 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): # noqa
+ def log(message): # noqa: E301
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 9813da29c..f5e6d724a 100644
--- a/src/mailman/commands/cli_lists.py
+++ b/src/mailman/commands/cli_lists.py
@@ -90,7 +90,7 @@ class Lists:
if not args.quiet:
print(_('No matching mailing lists found'))
return
- count = len(mailing_lists) # noqa
+ count = len(mailing_lists) # noqa: F841
if not args.quiet:
print(_('$count matching mailing lists found:'))
# Calculate the longest identifier.
@@ -199,7 +199,7 @@ class Create:
invalid_owners = [owner for owner in args.owners
if not validator.is_valid(owner)]
if invalid_owners:
- invalid = COMMASPACE.join(sorted(invalid_owners)) # noqa
+ invalid = COMMASPACE.join(sorted(invalid_owners)) # noqa: F841
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 0ed078ff3..f6502f14a 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) # noqa
+ count = len(m) # noqa: F841
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 dae9cfe0a..6b4abe45e 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() # noqa
+ fqdn_name = socket.getfqdn() # noqa: F841
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 d3df6dad7..306fb846a 100644
--- a/src/mailman/commands/cli_withlist.py
+++ b/src/mailman/commands/cli_withlist.py
@@ -207,7 +207,7 @@ class Withlist:
# Set the tab completion.
with ExitStack() as resources:
try: # pragma: no cover
- import readline, rlcompleter # noqa
+ import readline, rlcompleter # noqa: F401, E401
except ImportError: # pragma: no cover
print(_('readline not available'), file=sys.stderr)
pass
diff --git a/src/mailman/commands/eml_help.py b/src/mailman/commands/eml_help.py
index 8166effea..4ca2d72a4 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) # noqa
+ printable_arguments = SPACE.join(arguments) # noqa: F841
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 8168e98fa..7d3704e14 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)) # noqa
+ person = formataddr((display_name, email)) # noqa: F841
# 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)) # noqa
+ person = formataddr((user.display_name, email)) # noqa: F841
print(_('$person left $mlist.fqdn_listname'), file=results)
return ContinueProcessing.yes
diff --git a/src/mailman/commands/tests/test_shell.py b/src/mailman/commands/tests/test_shell.py
index 12e78c1ab..3540056f8 100644
--- a/src/mailman/commands/tests/test_shell.py
+++ b/src/mailman/commands/tests/test_shell.py
@@ -28,7 +28,7 @@ from mailman.testing.layers import ConfigLayer
from unittest.mock import patch
try:
- import readline # noqa
+ import readline # noqa: F401
has_readline = True
except ImportError:
has_readline = False