Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run the black tool #29

Closed
wants to merge 1 commit into from

Conversation

@Cereal2nd
Copy link
Contributor

Cereal2nd commented Oct 12, 2019

code formatting tool 'black' ran on the whole repo

@@ -83,7 +93,7 @@ def next_packet(self):
self.buffer = self.buffer[start_byte_index:]
if self.valid_header_waiting() and self.valid_body_waiting():
next_packet = self.extract_packet()
self.buffer = self.buffer[len(next_packet):]
self.buffer = self.buffer[len(next_packet) :]

This comment has been minimized.

Copy link
@hound

hound bot Oct 12, 2019

whitespace before ':'

self.buffer[0:packet_size - 2])[0] == self.buffer[packet_size - 2]
result = (
result
and checksum(self.buffer[0 : packet_size - 2])[0]

This comment has been minimized.

Copy link
@hound

hound bot Oct 12, 2019

whitespace before ':'

elif self._unit[channel] == "m3/h":
val = (1000 * 3600) / (self._delay[channel] * self._pulses[channel])
elif self._unit[channel] == "W":
val = (1000 * 1000 * 3600) / (self._delay[channel] * self._pulses[channel])

This comment has been minimized.

Copy link
@hound

hound bot Oct 12, 2019

line too long (87 > 79 characters)

if self._unit[channel] == "l/h":
val = (1000 * 3600) / (self._delay[channel] * self._pulses[channel])
elif self._unit[channel] == "m3/h":
val = (1000 * 3600) / (self._delay[channel] * self._pulses[channel])

This comment has been minimized.

Copy link
@hound

hound bot Oct 12, 2019

line too long (80 > 79 characters)

elif self._unit[channel] == 'W':
val = ((1000 * 1000 * 3600) / (self._delay[channel] * self._pulses[channel]))
if self._unit[channel] == "l/h":
val = (1000 * 3600) / (self._delay[channel] * self._pulses[channel])

This comment has been minimized.

Copy link
@hound

hound bot Oct 12, 2019

line too long (80 > 79 characters)

COMMAND_CODE,
tmp
]) + struct.pack('>L', self.delay_time)[-3:]
return bytes([COMMAND_CODE, tmp]) + struct.pack(">L", self.delay_time)[-3:]

This comment has been minimized.

Copy link
@hound

hound bot Oct 12, 2019

line too long (83 > 79 characters)

tmp
]) + struct.pack('>L', self.delay_time)[-3:]

return bytes([COMMAND_CODE, tmp]) + struct.pack(">L", self.delay_time)[-3:]

This comment has been minimized.

Copy link
@hound

hound bot Oct 12, 2019

line too long (83 > 79 characters)

COMMAND_CODE,
tmp
]) + struct.pack('>L', self.delay_time)[-3:]
return bytes([COMMAND_CODE, tmp]) + struct.pack(">L", self.delay_time)[-3:]

This comment has been minimized.

Copy link
@hound

hound bot Oct 12, 2019

line too long (83 > 79 characters)

COMMAND_CODE,
self.channels_to_byte([self.channel])
]) + bytes(self.name, 'utf-8')
return bytes([COMMAND_CODE, self.channels_to_byte([self.channel])]) + bytes(

This comment has been minimized.

Copy link
@hound

hound bot Oct 12, 2019

line too long (84 > 79 characters)

COMMAND_CODE,
self.channels_to_byte([self.channel])
]) + bytes(self.name, 'utf-8')
return bytes([COMMAND_CODE, self.channels_to_byte([self.channel])]) + bytes(

This comment has been minimized.

Copy link
@hound

hound bot Oct 12, 2019

line too long (84 > 79 characters)

@thomasdelaet

This comment has been minimized.

Copy link
Owner

thomasdelaet commented Oct 13, 2019

why are we doing this?

@Cereal2nd Cereal2nd closed this Oct 13, 2019
@Cereal2nd Cereal2nd deleted the Cereal2nd:black branch Oct 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.