From 5a0bc77a758a537df419d172fadda9d76fa97234 Mon Sep 17 00:00:00 2001 From: Martin Di Paola Date: Tue, 17 Mar 2026 10:20:27 -0300 Subject: [PATCH 1/2] chore: fix format --- byexample/log.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/byexample/log.py b/byexample/log.py index 9baf3be..1ebda03 100644 --- a/byexample/log.py +++ b/byexample/log.py @@ -334,6 +334,7 @@ def log_with(logger_name, child=True): finally: _logger_stack.pop() + class _DummyRLock: ''' A dummy reentrant lock to emulate a lock (acquire/release) but without @@ -364,6 +365,7 @@ def __enter__(self): def __exit__(self, exc_type, exc_value, traceback): self.release() + class XStreamHandler(logging.StreamHandler): def __init__(self, *args, **kargs): logging.StreamHandler.__init__(self, *args, **kargs) From 0bcf13471ed3f100f0b0ff0d2ca2532fa5ca3850 Mon Sep 17 00:00:00 2001 From: Martin Di Paola Date: Tue, 17 Mar 2026 10:21:44 -0300 Subject: [PATCH 2/2] chore: fix unintended str escape code from doc tests --- byexample/expected.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/byexample/expected.py b/byexample/expected.py index a1272c9..5544d36 100644 --- a/byexample/expected.py +++ b/byexample/expected.py @@ -348,7 +348,7 @@ def _get_captures_by_incremental_match( >>> expected = r'aa<...>bb<...>ddd<...>eee<...>cc' >>> got = r'aaAAbbBBxxxddeeeCCcc' - >>> expected_regexs = ['\A', 'aa', '(.*?)', 'bb', '(.*?)', 'ddd', + >>> expected_regexs = ['\\A', 'aa', '(.*?)', 'bb', '(.*?)', 'ddd', ... '(.*?)', 'eee', '(.*?)', 'cc', r'\n*\Z'] >>> charnos = [0, 0, 2, 7, 9, 14, 17, 22, 25, 30, 32] >>> rcounts = [0, 2, 0, 2, 0, 3, 0, 3, 0, 2, 0] @@ -396,7 +396,7 @@ def _get_captures_by_incremental_match( >>> expected = r'aabbdddeeecc' >>> got = r'aaAAbbBBxxxddeeeCCcc' - >>> expected_regexs = ['\A', 'aa', '(?P.*?)', 'bb', + >>> expected_regexs = ['\\A', 'aa', '(?P.*?)', 'bb', ... '(?P.*?)', 'ddd', '(?P.*?)', ... 'eee', '(?P.*?)', 'cc', r'\n*\Z'] >>> charnos = [0, 0, 2, 7, 9, 14, 17, 22, 25, 30, 32] @@ -423,7 +423,7 @@ def _get_captures_by_incremental_match( >>> expected = 'aabb\ncc\nddee' >>> got = 'aaAAbb\nxx\nxxAAee' - >>> expected_regexs = ['\A', 'aa', '(?P.*?)', 'bb\n', + >>> expected_regexs = ['\\A', 'aa', '(?P.*?)', 'bb\n', ... 'cc\n', 'dd', '(?P.*?)', ... 'ee', r'\n*\Z'] >>> charnos = [0, 0, 2, 7, 10, 13, 15, 20, 22] @@ -442,7 +442,7 @@ def _get_captures_by_incremental_match( >>> expected = 'aabb\ncc\nddee' - >>> expected_regexs = ['\A', 'aa', '(?P.*?)', 'bb\n', + >>> expected_regexs = ['\\A', 'aa', '(?P.*?)', 'bb\n', ... 'cc\n', 'dd', '(?P=foo)', ... 'ee', r'\n*\Z'] >>> rcounts = [0, 2, 0, 3, 3, 2, 1, 2, 0] # notice the +1