from .pogoda import ( _session as _weather_session, clear_weather_cache, fetch_weather, format_weather_data_for_console, format_weather_for_message, pressure_to_mmhg, wmo_to_russian, yandex_condition_to_russian, ) from .news import ( # noqa: E402 _session as _news_session, RSS_URL_ARTICLES, RSS_URL_POSTS, fetch_rss, format_articles, truncate_title, ) from .cat import ( # noqa: E402 _session as _cat_session, fetch_cat, ) __all__ = [ # Погода "clear_weather_cache", "fetch_weather", "format_weather_data_for_console", "format_weather_for_message", "pressure_to_mmhg", "wmo_to_russian", "yandex_condition_to_russian", # Новости "RSS_URL_ARTICLES", "RSS_URL_POSTS", "fetch_rss", "format_articles", "truncate_title", # Котики "fetch_cat", # Lifecycle "close_all_sessions", ] def close_all_sessions() -> None: """Закрыть все requests.Session для освобождения сокетов.""" for session in ( _weather_session, _news_session, _cat_session, ): try: session.close() except Exception: pass # Cleanup — игнорируем ошибки