From c6c705e0021d931fc0fa43f7989e863d2df7b30a Mon Sep 17 00:00:00 2001 From: Lukas Klenk Date: Wed, 23 Mar 2022 12:43:48 +0000 Subject: [PATCH] Change to raw string and add file extension to get a better match --- pysnooper/tracer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pysnooper/tracer.py b/pysnooper/tracer.py index c173302..2eefaf9 100644 --- a/pysnooper/tracer.py +++ b/pysnooper/tracer.py @@ -20,7 +20,7 @@ if pycompat.PY2: ipython_filename_pattern = re.compile('^$') -ansible_filename_pattern = re.compile('^(/.+zip)/(ansible/modules/.+)$') +ansible_filename_pattern = re.compile(r'^(/.+\.zip)/(ansible/modules/.+\.py)$') def get_local_reprs(frame, watch=(), custom_repr=(), max_length=None, normalize=False):