Skip to content

Commit

Permalink
remove use of inspect.stack(), fix #532 (#533)
Browse files Browse the repository at this point in the history
  • Loading branch information
bckohan committed Apr 5, 2024
1 parent cfbb6b1 commit 7928e18
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions split_settings/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from __future__ import annotations

import glob
import inspect
import os
import sys
import typing
Expand Down Expand Up @@ -76,7 +75,7 @@ def include( # noqa: WPS210, WPS231, C901
"""
# we are getting globals() from previous frame
# globals - it is caller's globals()
scope = scope or inspect.stack()[1][0].f_globals
scope = scope or sys._getframe(1).f_globals # noqa: WPS437

scope.setdefault('__included_files__', [])
included_files = scope.get('__included_files__', [])
Expand Down

0 comments on commit 7928e18

Please sign in to comment.