diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2023-01-09 17:42:53 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2023-01-09 19:00:40 -0500 |
commit | 880a64afd24aae34eff2781f568d8ac9807d2ecc (patch) | |
tree | 802cf3368d4d7a1b27ee6b5d614c367ac691e320 /lab/genpy.py | |
parent | 8fef6f057c377879720c4c9d994e9651362a49b9 (diff) | |
download | python-coveragepy-git-880a64afd24aae34eff2781f568d8ac9807d2ecc.tar.gz |
fix: isolate user code from coverage.py internal code flags. #1524
Diffstat (limited to 'lab/genpy.py')
-rw-r--r-- | lab/genpy.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lab/genpy.py b/lab/genpy.py index f968c916..f88e70ca 100644 --- a/lab/genpy.py +++ b/lab/genpy.py @@ -231,7 +231,7 @@ def show_a_bunch(): source = PythonSpinner.generate_python(maker.make_body("def")) try: print("-"*80, "\n", source, sep="") - compile(source, "<string>", "exec") + compile(source, "<string>", "exec", dont_inherit=True) except Exception as ex: print(f"Oops: {ex}\n{source}") if len(source) > len(longest): |