diff --git a/src/base_classes/data_sources.py b/src/base_classes/data_sources.py index 1c8ab76e..777320ea 100644 --- a/src/base_classes/data_sources.py +++ b/src/base_classes/data_sources.py @@ -213,7 +213,7 @@ class MLBAPIDataSource(DataSource): response.raise_for_status() data = response.json() - self.logger.debug(f"Fetched standings from MLB API") + self.logger.debug("Fetched standings from MLB API") return data except Exception as e: @@ -292,7 +292,7 @@ class SoccerAPIDataSource(DataSource): response.raise_for_status() data = response.json() - self.logger.debug(f"Fetched standings from soccer API") + self.logger.debug("Fetched standings from soccer API") return data except Exception as e: diff --git a/src/logo_downloader.py b/src/logo_downloader.py index b0cb830f..e4dad335 100644 --- a/src/logo_downloader.py +++ b/src/logo_downloader.py @@ -191,7 +191,7 @@ class LogoDownloader: return True except PermissionError: logger.error(f"Permission denied: Cannot write to directory {path}") - logger.error(f"Please run: sudo ./scripts/fix_perms/fix_assets_permissions.sh") + logger.error("Please run: sudo ./scripts/fix_perms/fix_assets_permissions.sh") return False except Exception as e: logger.error(f"Failed to test write access to directory {path}: {e}") @@ -248,7 +248,7 @@ class LogoDownloader: except PermissionError as e: logger.error(f"Permission denied downloading logo for {team_abbreviation}: {e}") - logger.error(f"Please run: sudo ./scripts/fix_perms/fix_assets_permissions.sh") + logger.error("Please run: sudo ./scripts/fix_perms/fix_assets_permissions.sh") return False except requests.exceptions.RequestException as e: logger.error(f"Failed to download logo for {team_abbreviation}: {e}") diff --git a/src/plugin_system/store_manager.py b/src/plugin_system/store_manager.py index 6ada0ab1..390d7eda 100644 --- a/src/plugin_system/store_manager.py +++ b/src/plugin_system/store_manager.py @@ -432,9 +432,9 @@ class PluginStoreManager: return stale if not self.github_token: self.logger.warning( - f"GitHub API rate limit likely exceeded (403). " - f"Add a GitHub personal access token to config/config_secrets.json " - f"under 'github.api_token' to increase rate limits from 60 to 5000/hour." + "GitHub API rate limit likely exceeded (403). " + "Add a GitHub personal access token to config/config_secrets.json " + "under 'github.api_token' to increase rate limits from 60 to 5000/hour." ) else: self.logger.warning( @@ -1077,7 +1077,7 @@ class PluginStoreManager: # Get the actual plugin ID from manifest (source of truth) manifest_plugin_id = manifest.get('id') if not manifest_plugin_id: - self.logger.error(f"Plugin manifest missing 'id' field") + self.logger.error("Plugin manifest missing 'id' field") self._safe_remove_directory(plugin_path) return False @@ -2389,7 +2389,7 @@ class PluginStoreManager: if not plugin_info_remote: self.logger.warning(f"Plugin {plugin_id} not found in registry and not a git repository; cannot update automatically") if not repo_url: - self.logger.warning(f"Plugin may have been installed via ZIP download. Try reinstalling from GitHub URL to enable updates.") + self.logger.warning("Plugin may have been installed via ZIP download. Try reinstalling from GitHub URL to enable updates.") return False repo_url = plugin_info_remote.get('repo') diff --git a/src/web_interface/validators.py b/src/web_interface/validators.py index 988d1700..e383ae99 100644 --- a/src/web_interface/validators.py +++ b/src/web_interface/validators.py @@ -55,7 +55,7 @@ def validate_image_url(url: str) -> Tuple[bool, Optional[str]]: parsed = urlparse(url) allowed_protocols = ['http', 'https'] if parsed.scheme not in allowed_protocols: - return False, f"Only http:// and https:// protocols are allowed" + return False, "Only http:// and https:// protocols are allowed" return True, None except Exception as e: return False, f"Invalid URL format: {str(e)}" diff --git a/src/wifi_manager.py b/src/wifi_manager.py index 09e1f3a5..5dd1a24f 100644 --- a/src/wifi_manager.py +++ b/src/wifi_manager.py @@ -1314,7 +1314,7 @@ class WiFiManager: # This ensures a clean switch between networks if original_ssid and original_ssid != ssid: logger.info(f"Switching networks: disconnecting from {original_ssid} before connecting to {ssid}") - self._show_led_message(f"Switching networks...", duration=3) + self._show_led_message("Switching networks...", duration=3) # Skip AP mode check since we're about to connect to a new network disconnect_success, disconnect_msg = self.disconnect_from_network(skip_ap_check=True) if disconnect_success: @@ -1370,7 +1370,7 @@ class WiFiManager: ap_success, ap_msg = self.enable_ap_mode() if ap_success: logger.info("AP mode enabled as failsafe") - return False, f"Connection failed and restoration failed. AP mode enabled." + return False, "Connection failed and restoration failed. AP mode enabled." else: logger.error(f"Failed to enable AP mode: {ap_msg}") return False, f"Connection failed, restoration failed, and AP mode failed: {ap_msg}" @@ -1382,7 +1382,7 @@ class WiFiManager: ap_success, ap_msg = self.enable_ap_mode() if ap_success: logger.info("AP mode enabled as failsafe") - return False, f"Connection failed. AP mode enabled." + return False, "Connection failed. AP mode enabled." else: return False, f"Connection failed and AP mode failed: {ap_msg}" @@ -1797,7 +1797,7 @@ class WiFiManager: logger.info("WiFi radio enabled and verified successfully") return True elif attempt < max_retries - 1: - logger.warning(f"WiFi radio enable command succeeded but not verified, will retry...") + logger.warning("WiFi radio enable command succeeded but not verified, will retry...") time.sleep(1) continue else: diff --git a/web_interface/start.py b/web_interface/start.py index 9af289a6..3dc8c03b 100644 --- a/web_interface/start.py +++ b/web_interface/start.py @@ -111,7 +111,7 @@ def main(): print("Access the interface at:") for ip in ips: if "AP Mode" in ip: - print(f" - http://192.168.4.1:5000 (AP Mode - connect to LEDMatrix-Setup WiFi)") + print(" - http://192.168.4.1:5000 (AP Mode - connect to LEDMatrix-Setup WiFi)") else: print(f" - http://{ip}:5000") else: