Skip to content

Commit

Permalink
Fix linting rules for Python 3.7 (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
hkpeprah committed May 30, 2018
1 parent 3d2793d commit 7f14142
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pylink/decorators.py
Expand Up @@ -17,7 +17,7 @@
import functools


def async(func):
def async_decorator(func):
"""Asynchronous function decorator. Interprets the function as being
asynchronous, so returns a function that will handle calling the
Function asynchronously.
Expand Down
2 changes: 1 addition & 1 deletion pylink/jlink.py
Expand Up @@ -2103,7 +2103,7 @@ def restart(self, num_instructions=0, skip_breakpoints=False):
return True

@connection_required
@decorators.async
@decorators.async_decorator
def halt(self):
"""Halts the CPU Core.
Expand Down
2 changes: 1 addition & 1 deletion pylink/library.py
Expand Up @@ -173,7 +173,7 @@ def find_library_darwin(cls):
======== ============================================================
Versions Directory
======== ============================================================
< 5.0.0 ``/Applications/SEGGER/JLink\ NUMBER``
< 5.0.0 ``/Applications/SEGGER/JLink\\ NUMBER``
< 6.0.0 ``/Applications/SEGGER/JLink/libjlinkarm.major.minor.dylib``
>= 6.0.0 ``/Applications/SEGGER/JLink/libjlinkarm``
======== ============================================================
Expand Down
2 changes: 1 addition & 1 deletion pylink/unlockers/unlock_kinetis.py
Expand Up @@ -247,7 +247,7 @@ def unlock_kinetis_jtag(jlink):
UNLOCK_METHODS[enums.JLinkInterfaces.JTAG] = unlock_kinetis_jtag


@decorators.async
@decorators.async_decorator
def unlock_kinetis(jlink):
"""Unlock for Freescale Kinetis K40 or K60 device.
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/test_decorators.py
Expand Up @@ -58,7 +58,7 @@ def test_async_decorator_invalid(self):
Returns:
`None`
"""
@decorators.async
@decorators.async_decorator
def foo():
return 4

Expand All @@ -74,7 +74,7 @@ def test_async_decorator_sync_call(self):
Returns:
`None`
"""
@decorators.async
@decorators.async_decorator
def foo():
return 4

Expand All @@ -90,7 +90,7 @@ def test_async_decorator_join(self):
Returns:
`None`
"""
@decorators.async
@decorators.async_decorator
def foo():
return 4

Expand Down Expand Up @@ -120,7 +120,7 @@ def test_async_decorator_exception(self):
Returns:
`None`
"""
@decorators.async
@decorators.async_decorator
def failure():
raise Exception('I HAVE FAILED!')

Expand Down

0 comments on commit 7f14142

Please sign in to comment.