diff --git a/examples/audio_controller_class_example.py b/examples/audio_controller_class_example.py index 92adaa9..e87784c 100644 --- a/examples/audio_controller_class_example.py +++ b/examples/audio_controller_class_example.py @@ -2,6 +2,7 @@ Per session GetMute() SetMute() GetMasterVolume() SetMasterVolume() using SimpleAudioVolume. """ + from pycaw.pycaw import AudioUtilities diff --git a/examples/audio_endpoint_volume_example.py b/examples/audio_endpoint_volume_example.py index f857af8..c94e055 100644 --- a/examples/audio_endpoint_volume_example.py +++ b/examples/audio_endpoint_volume_example.py @@ -1,6 +1,7 @@ """ Get and set access to master volume example. """ + from comtypes import CLSCTX_ALL from pycaw.pycaw import AudioUtilities, IAudioEndpointVolume diff --git a/examples/session_callback_example.py b/examples/session_callback_example.py index 4a2d153..2a0163c 100644 --- a/examples/session_callback_example.py +++ b/examples/session_callback_example.py @@ -20,6 +20,7 @@ https://docs.microsoft.com/en-us/windows/win32/api/audiopolicy/nn-audiopolicy-iaudiosessionevents """ + import time from comtypes import COMError diff --git a/examples/simple_audio_volume_example.py b/examples/simple_audio_volume_example.py index fa94ed9..eed5b78 100644 --- a/examples/simple_audio_volume_example.py +++ b/examples/simple_audio_volume_example.py @@ -1,6 +1,7 @@ """ Per session GetMute() SetMute() using ISimpleAudioVolume. """ + from pycaw.pycaw import AudioUtilities, ISimpleAudioVolume diff --git a/examples/volume_by_process_example.py b/examples/volume_by_process_example.py index a9f1b7c..3ec709e 100644 --- a/examples/volume_by_process_example.py +++ b/examples/volume_by_process_example.py @@ -1,6 +1,7 @@ """ Mutes the volume of all processes, but unmutes chrome.exe process. """ + from pycaw.pycaw import AudioUtilities diff --git a/examples/volume_callback_example.py b/examples/volume_callback_example.py index d199eb5..e27b60c 100644 --- a/examples/volume_callback_example.py +++ b/examples/volume_callback_example.py @@ -2,6 +2,7 @@ IAudioEndpointVolumeCallback.OnNotify() example. The OnNotify() callback method gets called on volume change. """ + from comtypes import CLSCTX_ALL, COMObject from pycaw.pycaw import ( diff --git a/pycaw/pycaw.py b/pycaw/pycaw.py index 0f2f826..e4339eb 100644 --- a/pycaw/pycaw.py +++ b/pycaw/pycaw.py @@ -1,6 +1,7 @@ """ Python wrapper around the Core Audio Windows API. """ + # import here all newly split up modules, # to keep backwards compatibility diff --git a/tests/test_core.py b/tests/test_core.py index 5448c81..437aa4a 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1,6 +1,7 @@ """ Verifies core features run as expected. """ + import sys import warnings from contextlib import contextmanager diff --git a/tests/test_examples.py b/tests/test_examples.py index f229c35..8c53e73 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -1,6 +1,7 @@ """ Verifies examples run as expected. """ + import pytest from examples import (