Skip to content

Commit

Permalink
fix flake8 warnings for python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
s-martin committed Mar 18, 2024
1 parent 3d628d8 commit 01b8027
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/jukebox/components/controls/common/evdev_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def run(self):
self._connect()
except FileNotFoundError as e:
# This error occurs, if opening the bluetooth input device fails
logger.debug(f"{e} (attempt: {idx+1}/{self.open_retry_cnt}). Retrying in {self.open_retry_delay}")
logger.debug(f"{e} (attempt: {idx + 1}/{self.open_retry_cnt}). Retrying in {self.open_retry_delay}")
time.sleep(self.open_retry_delay)
except AttributeError as e:
# This error occurs, when the device can be found, but does not have the mandatory keys
Expand Down
4 changes: 2 additions & 2 deletions src/jukebox/components/synchronisation/rfidcards/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def _is_file_remote(self, path: str) -> bool:
_runresult = subprocess.run(['ssh',
f"{_user}@{_host}", f"-p {_port}",
'[', '-f', f"'{path}'", ']'],
shell=False, check=False, capture_output=True, text=True)
shell=False, check=False, capture_output=True, text=True)

_result = _runresult.returncode == 0

Expand All @@ -328,7 +328,7 @@ def _is_dir_remote(self, path: str) -> bool:
_runresult = subprocess.run(['ssh',
f"{_user}@{_host}", f"-p {_port}",
'[', '-d', f"'{path}'", ']'],
shell=False, check=False, capture_output=True, text=True)
shell=False, check=False, capture_output=True, text=True)

_result = _runresult.returncode == 0

Expand Down
2 changes: 1 addition & 1 deletion src/jukebox/components/volume/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def _publish_outputs(self, pulse_inst: pulsectl.Pulse):
def _set_output(self, pulse_inst: pulsectl.Pulse, sink_index: int):
error_state = 1
if not 0 <= sink_index < len(self._sink_list):
logger.error(f"Sink index '{sink_index}' out of range (0..{len(self._sink_list)-1}). "
logger.error(f"Sink index '{sink_index}' out of range (0..{len(self._sink_list) - 1}). "
f"Did you configure your secondary output device?")
else:
# Before we switch the sink, check the new sinks volume levels...
Expand Down
2 changes: 1 addition & 1 deletion src/jukebox/run_configure_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def query_sinks(pulse_config: PaConfigClass): # noqa: C901
if sink_is_equalizer(primary_signal_chain[sidx - 1]):
pulse_config.enable_equalizer = False
print(f"\n*** Equalizer already configured for '{pulse_config.primary}' with name\n"
f" '{primary_signal_chain[sidx-1].name}'. Shifting entry point...")
f" '{primary_signal_chain[sidx - 1].name}'. Shifting entry point...")
pulse_config.primary = primary_signal_chain[sidx - 1].name
sidx -= 1
except ValueError:
Expand Down

0 comments on commit 01b8027

Please sign in to comment.