From 1139d163183cc77119122c958981248c572b655c Mon Sep 17 00:00:00 2001 From: Frank Hoffmann <15r10nk-git@polarbit.de> Date: Wed, 23 Oct 2024 20:55:15 +0200 Subject: [PATCH] fix: some fixes --- requirements.txt | 2 +- setup.cfg | 3 +++ src/inline_snapshot/_inline_snapshot.py | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c7ffe581..0054d4d0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -. +-e ./mutants dirty-equals>=0.7.0 hypothesis>=6.75.5 mypy>=1.2.0 diff --git a/setup.cfg b/setup.cfg index fb271e2a..0fa63cd6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,6 @@ [mutmut] also_copy= src/inline_snapshot/py.typed + conftest.py + pyproject.toml + README.md diff --git a/src/inline_snapshot/_inline_snapshot.py b/src/inline_snapshot/_inline_snapshot.py index 21dd39c1..bb7f77ce 100644 --- a/src/inline_snapshot/_inline_snapshot.py +++ b/src/inline_snapshot/_inline_snapshot.py @@ -571,11 +571,13 @@ def snapshot(obj: Any = undefined) -> Any: assert frame is not None frame = frame.f_back while "mutmut" in frame.f_code.co_name: + assert frame is not None frame = frame.f_back assert frame is not None frame = frame.f_back while "mutmut" in frame.f_code.co_name: + assert frame is not None frame = frame.f_back assert frame is not None