events auth repair

This commit is contained in:
2025-01-16 22:35:49 +03:00
parent 426b69b33c
commit 61229cb761
23 changed files with 945 additions and 754 deletions

View File

@@ -1,5 +1,14 @@
def get_line_number_for_error():
from inspect import currentframe, getframeinfo
"""Utility functions for getting line numbers and file locations."""
frameinfo = getframeinfo(currentframe())
from inspect import currentframe, getframeinfo, stack
def get_line_number_for_error() -> str:
"""Get the file name and line number of where an error occurred.
Returns:
str: A string in the format 'filename | line_number' showing where the error occurred
"""
caller = stack()[1] # Get the caller's frame
frameinfo = getframeinfo(caller[0])
return f"{frameinfo.filename} | {frameinfo.lineno}"