Skip to content

feat: enhance error_logger.py with type hints and utility functions#1647

Open
ashrion wants to merge 1 commit into
steam-bell-92:mainfrom
ashrion:feat/error-logger-type-hints
Open

feat: enhance error_logger.py with type hints and utility functions#1647
ashrion wants to merge 1 commit into
steam-bell-92:mainfrom
ashrion:feat/error-logger-type-hints

Conversation

@ashrion

@ashrion ashrion commented Jul 11, 2026

Copy link
Copy Markdown

Summary

Enhanced error_logger.py with improved type hints and added utility functions for better error management.

Changes

  • Added TypeVar for generic safe_run return type
  • Added Callable import and type hint for safe_run action parameter
  • Added get_recent_errors() - retrieve recent error entries with limit
  • Added clear_logs() - clear all error logs (returns bool)
  • Improved safe_run signature with proper generic typing
  • Added collections.abc.Callable import

How to Test

  1. Import the module: from error_logger import get_recent_errors, clear_logs, safe_run
  2. Test each function with existing logs

Related Issues

Fixes #1646

GSSoC 2026

- Added TypeVar for generic safe_run return type
- Added get_recent_errors() to retrieve recent error entries
- Added clear_logs() to clear all error logs
- Improved safe_run signature with proper generic typing

Fixes steam-bell-92#1646
@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

@ashrion is attempting to deploy a commit to the Anuj's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: enhance error_logger.py with type hints and utility functions

1 participant