Skip to content

Commit

Permalink
PEP8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mseppanen committed Nov 15, 2016
1 parent d8f5bf5 commit e032cf1
Showing 4 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions idiokit/_selectloop.py
Original file line number Diff line number Diff line change
@@ -244,6 +244,7 @@ def iterate(self):
calls = self._process(has_errors, rfds, wfds, xfds)
self._perform(calls)


global_select_loop = SelectLoop()
select = global_select_loop.select
sleep = global_select_loop.sleep
14 changes: 14 additions & 0 deletions idiokit/dns/_dns.py
Original file line number Diff line number Diff line change
@@ -409,6 +409,8 @@ def ip(self):

def pack(self):
return _socket.inet_pton(_socket.AF_INET, self._ip)


RR.register_type(A)


@@ -445,6 +447,8 @@ def ip(self):

def pack(self):
return _socket.inet_pton(_socket.AF_INET6, self._ip)


RR.register_type(AAAA)


@@ -507,6 +511,8 @@ def pack(self):
strings.append(chr(len(string)))
strings.append(string)
return "".join(strings)


RR.register_type(TXT)


@@ -536,6 +542,8 @@ def name(self):

def pack(self):
return pack_name(self._name)


RR.register_type(PTR)


@@ -565,6 +573,8 @@ def name(self):

def pack(self):
return pack_name(self._name)


RR.register_type(CNAME)


@@ -617,6 +627,8 @@ def target(self):

def pack(self):
return self._struct.pack(self._priority, self._weight, self._port) + pack_name(self._target)


RR.register_type(SRV)


@@ -658,6 +670,8 @@ def exchange(self):

def pack(self):
return self._struct.pack(self._preference) + pack_name(self._exchange)


RR.register_type(MX)


2 changes: 2 additions & 0 deletions idiokit/ssl.py
Original file line number Diff line number Diff line change
@@ -132,6 +132,8 @@ def _ca_certs(ca_certs=None):
fileobj.write(_DUMMY_CERT_DATA)
fileobj.flush()
yield fileobj.name


ca_certs = _ca_certs


2 changes: 2 additions & 0 deletions idiokit/xmlcore.py
Original file line number Diff line number Diff line change
@@ -138,6 +138,8 @@ def quoteattr(attr):
_quoteattr_cache[attr] = value
_quoteattr_cache_size += length
return value


_quoteattr_cache = {}
_quoteattr_cache_size = 0
_quoteattr_cache_max_size = 2 ** 16

0 comments on commit e032cf1

Please # to comment.