From ff58945436d5b8fdcb2f6ee90ccf6470ea6916d7 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Mon, 12 Aug 2024 19:46:48 +0430 Subject: [PATCH] fix : autopep8 --- nava/functions.py | 2 ++ nava/params.py | 2 ++ nava/thread.py | 1 + 3 files changed, 5 insertions(+) diff --git a/nava/functions.py b/nava/functions.py index a88753b..426d4ee 100644 --- a/nava/functions.py +++ b/nava/functions.py @@ -252,6 +252,7 @@ def path_checker(sound_path, *args, **kwargs): return func(sound_path, *args, **kwargs) return path_checker + def __play_auto(sound_path, async_mode=False, loop=False): """ Play sound in automatic mode. @@ -272,6 +273,7 @@ def __play_auto(sound_path, async_mode=False, loop=False): else: return __play_alsa(sound_path, async_mode, loop) + @path_check def play(sound_path, async_mode=False, loop=False, engine=Engine.AUTO): """ diff --git a/nava/params.py b/nava/params.py index 111600c..98bcfde 100644 --- a/nava/params.py +++ b/nava/params.py @@ -9,6 +9,7 @@ """ + class Engine(Enum): """ Nava engine class. @@ -22,6 +23,7 @@ class Engine(Enum): ALSA = "alsa" AFPLAY = "afplay" + SOUND_FILE_PLAY_ERROR = "Sound can not play due to some issues." SOUND_FILE_EXIST_ERROR = "Given sound file doesn't exist." SOUND_FILE_PATH_TYPE_ERROR = "Sound file's path should be a string." diff --git a/nava/thread.py b/nava/thread.py index 1bd7234..f281d74 100644 --- a/nava/thread.py +++ b/nava/thread.py @@ -4,6 +4,7 @@ import threading from .params import Engine + class NavaThread(threading.Thread): """Nava custom thread."""