Skip to content

Commit 4fa173e

Browse files
committed
Fix up some lint issues
1 parent 91de0aa commit 4fa173e

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

receptor/__main__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
import argparse
2-
import datetime
31
import logging
42
import logging.config
53
import sys
64

75
from .config import ReceptorConfig
8-
from .receptor import Receptor
96

107
logger = logging.getLogger(__name__)
118

receptor/config.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
},
3131
}
3232

33+
3334
def py_class(class_spec):
3435
if class_spec not in SINGLETONS:
3536
module_name, class_name = class_spec.rsplit('.', 1)
@@ -256,8 +257,8 @@ def __init__(self, args=None):
256257
self.parse_options(args)
257258

258259
def add_config_option(self, section, key, cli=True, short_option='', long_option='',
259-
default_value=None, set_value=None, value_type=None, listof=None, subparse=True,
260-
hint=None):
260+
default_value=None, set_value=None, value_type=None, listof=None, subparse=True,
261+
hint=None):
261262

262263
config_entry = '%s_%s' % (section, key)
263264
if cli:
@@ -404,7 +405,7 @@ def _enforce_value_type(self, value, value_type):
404405
def go(self):
405406
if not self._parsed_args:
406407
raise ReceptorRuntimeError("there are no parsed args yet")
407-
elif not hasattr(self._parsed_args, 'subparser_name'):
408+
elif not hasattr(self._parsed_args, 'func'):
408409
raise ReceptorRuntimeError("you must specify a subcommand (%s)." % (", ".join(SUBCOMMAND_EXTRAS.keys()),))
409410
self._parsed_args.func(self)
410411

receptor/controller.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def connect_to_socket(socket_path):
1414
sock.connect(socket_path)
1515
return sock
1616

17+
1718
def send_directive(directive, recipient, payload, sock):
1819
if payload == '-':
1920
payload = sys.stdin.read()
@@ -28,6 +29,7 @@ def send_directive(directive, recipient, payload, sock):
2829

2930
return response
3031

32+
3133
# FIXME: the socket path is in the config, it shouldn't need to be passed as an arg here
3234
def mainloop(receptor, socket_path, loop=asyncio.get_event_loop()):
3335
config = receptor.config

0 commit comments

Comments
 (0)