Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove use of inspect.stack(), fix #532 #533

Merged
merged 1 commit into from Apr 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions split_settings/tools.py
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