Improve code formatting: break long import lines for better readability

Co-authored-by: RetroGameSets <102905084+RetroGameSets@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-08-04 12:32:04 +00:00
parent 9f55fa5417
commit 26bdad97d5
3 changed files with 17 additions and 18 deletions

View File

@@ -7,12 +7,22 @@ import logging
import requests
import queue
import datetime
from display import init_display, draw_loading_screen, draw_error_screen, draw_platform_grid, draw_progress_screen, draw_controls, draw_virtual_keyboard, draw_popup_result_download, draw_extension_warning, draw_pause_menu, draw_controls_help, draw_game_list, draw_history_list, draw_clear_history_dialog, draw_cancel_download_dialog, draw_confirm_dialog, draw_redownload_game_cache_dialog, draw_popup, draw_gradient, THEME_COLORS
from display import (
init_display, draw_loading_screen, draw_error_screen, draw_platform_grid,
draw_progress_screen, draw_controls, draw_virtual_keyboard, draw_popup_result_download,
draw_extension_warning, draw_pause_menu, draw_controls_help, draw_game_list,
draw_history_list, draw_clear_history_dialog, draw_cancel_download_dialog,
draw_confirm_dialog, draw_redownload_game_cache_dialog, draw_popup, draw_gradient,
THEME_COLORS
)
from language import handle_language_menu_events, _
from network import test_internet, download_rom, is_1fichier_url, download_from_1fichier, check_for_updates
from controls import handle_controls, validate_menu_state, process_key_repeats
from controls_mapper import load_controls_config, map_controls, draw_controls_mapping, ACTIONS
from utils import detect_non_pc, load_sources, check_extension_before_download, extract_zip_data, play_random_music, load_accessibility_settings, load_music_config
from utils import (
detect_non_pc, load_sources, check_extension_before_download, extract_zip_data,
play_random_music, load_accessibility_settings, load_music_config
)
from history import load_history, save_history
import config
from config import OTA_data_ZIP

View File

@@ -9,7 +9,11 @@ import json
import os
from display import draw_validation_transition
from network import download_rom, download_from_1fichier, is_1fichier_url
from utils import load_games, check_extension_before_download, is_extension_supported, load_extensions_json, play_random_music, sanitize_filename, load_api_key_1fichier, save_music_config
from utils import (
load_games, check_extension_before_download, is_extension_supported,
load_extensions_json, play_random_music, sanitize_filename,
load_api_key_1fichier, save_music_config
)
from history import load_history, clear_history, add_to_history, save_history
import logging
from language import _ # Import de la fonction de traduction

View File

@@ -162,21 +162,6 @@ def load_games(platform_id):
with open(games_path, 'r', encoding='utf-8') as f:
games = json.load(f)
# Tester la première URL si la liste n'est pas vide
# if games and len(games) > 0 and len(games[0]) > 1:
# first_url = games[0][1]
# try:
# response = requests.head(first_url, timeout=5, allow_redirects=True)
# if response.status_code not in (200, 303): # Ne logger que les codes autres que 200 et 303
# logger.debug(f"https://{first_url} \"HEAD {first_url} HTTP/1.1\" {response.status_code} 0")
# if response.status_code == 404:
# logger.error(f"URL non accessible pour {platform_id} : {first_url} (code 404)")
# unavailable_systems.append(platform_id) # Assurez-vous que unavailable_systems est défini
# except requests.RequestException as e:
# logger.error(f"Erreur lors du test de l'URL pour {platform_id} : {first_url} ({str(e)})")
# else:
# logger.debug(f"Aucune URL à tester pour {platform_id} (liste vide ou mal formée)")
logger.debug(f"Jeux chargés pour {platform_id}: {len(games)} jeux")
return games
except Exception as e: