-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements unit tests for common decorators and stubs tests for less used ones
- Loading branch information
1 parent
0a6c483
commit 98f655a
Showing
8 changed files
with
338 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
from ovos_utils.log import log_deprecation | ||
|
||
|
||
def converse_handler(): | ||
"""Decorator for aliasing a method as the converse method""" | ||
|
||
def real_decorator(func): | ||
if not hasattr(func, 'converse'): | ||
func.converse = True | ||
return func | ||
|
||
return real_decorator | ||
def converse_handler(func): | ||
""" | ||
Decorator for aliasing a method as the converse method | ||
""" | ||
log_deprecation("Import from `ovos_workshop.decorators`", "0.1.0") | ||
if not hasattr(func, 'converse'): | ||
func.converse = True | ||
return func |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.