Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sanyatuning committed Mar 7, 2020
1 parent af93c79 commit 31351c7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
11 changes: 5 additions & 6 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,19 @@ async def init_dev():

for key, endp in device.endpoints.items():
LOGGER.info("endpoint %s", key)
if hasattr(endp, 'in_clusters'):
if hasattr(endp, "in_clusters"):
LOGGER.info("in_clusters %s", endp.in_clusters)
LOGGER.info("out_clusters %s", endp.out_clusters)

await asyncio.sleep(2)
await endp.out_clusters[8].bind()


# res = await device.zdo.bind(endp.out_clusters[8])
# LOGGER.warning(res)
#res = await device.zdo.bind(endp.out_clusters[6])
#LOGGER.warning(res)
#res = await device.zdo.bind(endp.in_clusters[1])
#LOGGER.warning(res)
# res = await device.zdo.bind(endp.out_clusters[6])
# LOGGER.warning(res)
# res = await device.zdo.bind(endp.in_clusters[1])
# LOGGER.warning(res)

# power_cluster: PowerConfiguration = endp.in_clusters[1]
# res = await power_cluster.configure_reporting(
Expand Down
12 changes: 6 additions & 6 deletions version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import re
import sys

parts = re.sub(r'^.*/v?', '', sys.argv[1]).split('.')
parts = re.sub(r"^.*/v?", "", sys.argv[1]).split(".")
dir = os.path.dirname(os.path.realpath(__file__))

with fileinput.FileInput(dir + '/zigpy_cc/__init__.py', inplace=True) as file:
with fileinput.FileInput(dir + "/zigpy_cc/__init__.py", inplace=True) as file:
for line in file:
line = re.sub(r'(MAJOR_VERSION =).*', '\\1 ' + parts[0], line)
line = re.sub(r'(MINOR_VERSION =).*', '\\1 ' + parts[1], line)
line = re.sub(r'(PATCH_VERSION =).*', '\\1 ' + parts[2], line)
print(line, end='')
line = re.sub(r"(MAJOR_VERSION =).*", "\\1 " + parts[0], line)
line = re.sub(r"(MINOR_VERSION =).*", "\\1 " + parts[1], line)
line = re.sub(r"(PATCH_VERSION =).*", "\\1 " + parts[2], line)
print(line, end="")
4 changes: 2 additions & 2 deletions zigpy_cc/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ async def wait(self):

def set_result(self, result) -> None:
if self.future.cancelled():
LOGGER.warning('Waiter already cancelled: %s', self)
LOGGER.warning("Waiter already cancelled: %s", self)
elif self.future.done():
LOGGER.warning('Waiter already done: %s', self)
LOGGER.warning("Waiter already done: %s", self)
else:
self.future.set_result(result)

Expand Down

0 comments on commit 31351c7

Please sign in to comment.