summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Leonhardt <toleonha@microsoft.com>2018-09-13 11:35:08 -0400
committerTodd Leonhardt <toleonha@microsoft.com>2018-09-13 11:35:08 -0400
commit83db3d2f684f26f2117c1e212f9d33172f2d75d4 (patch)
treecbd7e9d74032cd5864dda4be7d7330bf9ff4c063
parent49236d98a770d9604e65eb1728d2f8d68e35d493 (diff)
downloadcmd2-git-83db3d2f684f26f2117c1e212f9d33172f2d75d4.tar.gz
This just fixes a couple minor lint warnings related to raw strings and escapes
-rw-r--r--cmd2/cmd2.py2
-rw-r--r--cmd2/transcript.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index fb929078..dee2825f 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -3031,7 +3031,7 @@ a..b, a:b, a:, ..b items by indices (inclusive)
# get the output out of the buffer
output = membuf.read()
# and add the regex-escaped output to the transcript
- transcript += output.replace('/', '\/')
+ transcript += output.replace('/', r'\/')
# Restore stdout to its original state
self.stdout = saved_self_stdout
diff --git a/cmd2/transcript.py b/cmd2/transcript.py
index 5ba8d20d..8df58634 100644
--- a/cmd2/transcript.py
+++ b/cmd2/transcript.py
@@ -106,7 +106,7 @@ class Cmd2TestCase(unittest.TestCase):
self.assertTrue(re.match(expected, result, re.MULTILINE | re.DOTALL), message)
def _transform_transcript_expected(self, s: str) -> str:
- """Parse the string with slashed regexes into a valid regex.
+ r"""Parse the string with slashed regexes into a valid regex.
Given a string like: