Skip to content

Commit

Permalink
Remove usage of reserved async keyword (#16)
Browse files Browse the repository at this point in the history
thanks for the update.
  • Loading branch information
h3ndrik authored and Yoda-x committed Apr 29, 2019
1 parent 1281698 commit 1599f3e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bellows/cli/ncp.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@click.argument('config', required=False)
@click.option('-a', '--all', 'all_', is_flag=True)
@click.pass_context
@util.async
@util.background
async def config(ctx, config, all_):
"""Get/set configuration on the NCP"""
click.secho(
Expand Down Expand Up @@ -69,7 +69,7 @@ async def config(ctx, config, all_):

@main.command()
@click.pass_context
@util.async
@util.background
async def info(ctx):
"""Get NCP information"""
s = await util.setup(ctx.obj['device'], ctx.obj['baudrate'])
Expand Down
6 changes: 3 additions & 3 deletions bellows/cli/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
@opts.extended_pan
@opts.pan
@click.pass_context
@util.async
@util.background
async def join(ctx, channels, pan_id, extended_pan_id):
"""Join an existing ZigBee network as an end device"""
def cb(fut, frame_name, response):
Expand Down Expand Up @@ -111,7 +111,7 @@ def cb(fut, frame_name, response):

@main.command()
@click.pass_context
@util.async
@util.background
async def leave(ctx):
"""Leave the ZigBee network"""
s = await util.setup(ctx.obj['device'], ctx.obj['baudrate'])
Expand All @@ -130,7 +130,7 @@ async def leave(ctx):
@opts.duration_ms
@click.option('-e', '--energy', 'energy_scan', is_flag=True)
@click.pass_context
@util.async
@util.background
async def scan(ctx, channels, duration_ms, energy_scan):
"""Scan for networks or radio interference"""
s = await util.setup(ctx.obj['device'], ctx.obj['baudrate'])
Expand Down
2 changes: 1 addition & 1 deletion bellows/cli/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def convert(self, value, param, ctx):
return t.EmberEUI64([t.uint8_t(p, base=16) for p in value.split(':')])


def async(f):
def background(f):
@functools.wraps(f)
def inner(*args, **kwargs):
loop = asyncio.get_event_loop()
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and then run "tox" from this directory.

[tox]
envlist = py35, py36, lint
envlist = py35, py36, py37, lint
skip_missing_interpreters = True

[testenv]
Expand Down

0 comments on commit 1599f3e

Please sign in to comment.