Skip to content

Commit

Permalink
♻️ Code cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreMiras committed Apr 23, 2024
1 parent d56f50d commit 0afd500
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/session_callback_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def add_callback(app_name):
exit("Enter the right 'app_name', start it and play something")

print("Ready to go!")
print("Change the volume / mute state " "/ close the app or unplug your speaker")
print("Change the volume / mute state / close the app or unplug your speaker")
print("and watch the callbacks ;)\n")

try:
Expand Down
2 changes: 1 addition & 1 deletion examples/volume_callback_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def main():
volume = interface.QueryInterface(IAudioEndpointVolume)
callback = AudioEndpointVolumeCallback()
volume.RegisterControlChangeNotify(callback)
for i in range(3):
for _ in range(3):
volume.SetMute(0, None)
volume.SetMute(1, None)

Expand Down
3 changes: 0 additions & 3 deletions pycaw/api/mmdeviceapi/depend/structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,10 @@ def GetValue(self):
if vt == VT_BOOL:
return self.union.boolVal != 0
elif vt == VT_LPWSTR:
# return Marshal.PtrToStringUni(union.pwszVal)
return self.union.pwszVal
elif vt == VT_UI4:
return self.union.lVal
elif vt == VT_CLSID:
# TODO
# return (Guid)Marshal.PtrToStructure(union.puuid, typeof(Guid))
return
else:
return "%s:?" % (vt)
Expand Down
2 changes: 1 addition & 1 deletion pycaw/magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def activate_magic(cls):
self.magic_session()
"""
if cls.magic_activated:
warn = "cannot activate MagicManager. " "MagicManager is already active!"
warn = "cannot activate MagicManager. MagicManager is already active!"
log.warning(warn)
warnings.warn(warn)
return
Expand Down

0 comments on commit 0afd500

Please sign in to comment.