few small cleanups

This commit is contained in:
Zack Dever
2015-12-03 17:46:08 -08:00
parent 5d87a5edb4
commit efc3d4f466
3 changed files with 2 additions and 8 deletions

View File

@@ -10,7 +10,7 @@ logger = logging.getLogger(__name__)
class Cluster(object):
def __init__(self, **kwargs):
if 'bootstrap_servers' not in kwargs:
kargs['bootstrap_servers'] = 'localhost'
kwargs['bootstrap_servers'] = 'localhost'
self._brokers = {}
self._topics = {}

View File

@@ -30,12 +30,6 @@ class JoinGroupRequest(Struct):
)
class ProtocolName(Struct):
SCHEMA = Schema(
('assignment_strategy', String('utf-8'))
)
class ProtocolMetadata(Struct):
SCHEMA = Schema(
('version', Int16),

View File

@@ -21,7 +21,7 @@ class Struct(AbstractType):
self.encode = self._encode_self
@classmethod
def encode(cls, item):
def encode(cls, item): # pylint: disable-msg=E0202
bits = []
for i, field in enumerate(cls.SCHEMA.fields):
bits.append(field.encode(item[i]))