kopia lustrzana https://github.com/Yakifo/amqtt
flake8: Fix all Wxxx whitespace and newline warnings
rodzic
df2c9b8a43
commit
ed676945b4
|
@ -345,7 +345,7 @@ class MQTTClient:
|
|||
# Decode URI attributes
|
||||
uri_attributes = urlparse(self.session.broker_uri)
|
||||
scheme = uri_attributes.scheme
|
||||
secure = True if scheme in ('mqtts', 'wss') else False
|
||||
secure = True if scheme in ('mqtts', 'wss') else False
|
||||
self.session.username = uri_attributes.username
|
||||
self.session.password = uri_attributes.password
|
||||
self.session.remote_address = uri_attributes.hostname
|
||||
|
|
|
@ -24,4 +24,4 @@ class UnsubackPacket(MQTTPacket):
|
|||
@classmethod
|
||||
def build(cls, packet_id):
|
||||
variable_header = PacketIdVariableHeader(packet_id)
|
||||
return cls(variable_header=variable_header)
|
||||
return cls(variable_header=variable_header)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# Copyright (c) 2015 Nicolas JOUANIN
|
||||
#
|
||||
# See the file license.txt for copying permission.
|
||||
|
||||
|
|
|
@ -168,4 +168,4 @@ class Session:
|
|||
self.delivered_message_queue = Queue()
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.client_id == other.client_id
|
||||
return self.client_id == other.client_id
|
||||
|
|
|
@ -51,4 +51,4 @@ def get_git_changeset():
|
|||
timestamp = datetime.datetime.utcfromtimestamp(int(timestamp))
|
||||
except ValueError:
|
||||
return None
|
||||
return timestamp.strftime('%Y%m%d%H%M%S')
|
||||
return timestamp.strftime('%Y%m%d%H%M%S')
|
||||
|
|
|
@ -78,4 +78,4 @@ def main(*args, **kwargs):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
main()
|
||||
|
|
|
@ -165,4 +165,4 @@ def main(*args, **kwargs):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
main()
|
||||
|
|
|
@ -22,4 +22,4 @@ class PubrecPacketTest(unittest.TestCase):
|
|||
variable_header = PacketIdVariableHeader(10)
|
||||
publish = PubrecPacket(variable_header=variable_header)
|
||||
out = publish.to_bytes()
|
||||
self.assertEqual(out, b'\x50\x02\x00\x0a')
|
||||
self.assertEqual(out, b'\x50\x02\x00\x0a')
|
||||
|
|
|
@ -22,4 +22,4 @@ class PubrelPacketTest(unittest.TestCase):
|
|||
variable_header = PacketIdVariableHeader(10)
|
||||
publish = PubrelPacket(variable_header=variable_header)
|
||||
out = publish.to_bytes()
|
||||
self.assertEqual(out, b'\x62\x02\x00\x0a')
|
||||
self.assertEqual(out, b'\x62\x02\x00\x0a')
|
||||
|
|
|
@ -34,4 +34,4 @@ class TestCodecs(unittest.TestCase):
|
|||
|
||||
def test_encode_string(self):
|
||||
encoded = encode_string('AA')
|
||||
self.assertEqual(b'\x00\x02AA', encoded)
|
||||
self.assertEqual(b'\x00\x02AA', encoded)
|
||||
|
|
3
tox.ini
3
tox.ini
|
@ -11,9 +11,6 @@ ignore =
|
|||
F403, # 'from x import *' used; unable to detect undefined names (~29 warnings)
|
||||
F821, # undefined name 'x' (~1 warnings)
|
||||
F841, # local variable 'wildcard_pattern' is assigned to but never used (~17 warnings)
|
||||
W291, # trailing whitespace (~1 warnings)
|
||||
W292, # no newline at end of file (~18 warnings)
|
||||
W391, # blank line at end of file (~1 warnings)
|
||||
E265, # block comment should start with '# ' (~64 warnings)
|
||||
E501, # line too long (~664 warnings)
|
||||
F405, # 'x' may be undefined, or defined from star imports (~401 warnings)
|
||||
|
|
Ładowanie…
Reference in New Issue