Skip to content

Commit

Permalink
annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Jul 24, 2024
1 parent e4ec5be commit 8d5c906
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/textual/_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Functions related to debugging.
"""

from __future__ import annotations

from . import constants


Expand All @@ -11,10 +13,11 @@ def get_caller_file_and_line() -> str | None:
Returns:
Path and file if `constants.DEBUG==True`
"""
import inspect

if not constants.DEBUG:
return None
import inspect

try:
current_frame = inspect.currentframe()
caller_frame = inspect.getframeinfo(current_frame.f_back.f_back)
Expand Down

0 comments on commit 8d5c906

Please sign in to comment.