diff --git a/org_rw/org_rw.py b/org_rw/org_rw.py index 7129393..b85118b 100644 --- a/org_rw/org_rw.py +++ b/org_rw/org_rw.py @@ -884,7 +884,7 @@ class Headline: names_by_line = {} for kw in self.keywords: - if kw.key == "NAME": + if kw.key == 'NAME': names_by_line[kw.linenum] = kw.value name = None diff --git a/tests/test_org.py b/tests/test_org.py index 5a0bc53..1853d7b 100644 --- a/tests/test_org.py +++ b/tests/test_org.py @@ -480,7 +480,10 @@ class TestSerde(unittest.TestCase): snippets = list(doc.get_code_snippets()) self.assertEqual(len(snippets), 3) - self.assertEqual(snippets[0].name, "first-code-name") + self.assertEqual( + snippets[0].name, + 'first-code-name' + ) self.assertEqual( snippets[0].content, 'echo "This is a test"\n' @@ -495,7 +498,10 @@ class TestSerde(unittest.TestCase): "This is a test\n" + "with two lines", ) - self.assertEqual(snippets[1].name, None) + self.assertEqual( + snippets[1].name, + None + ) self.assertEqual( snippets[1].content, 'echo "This is another test"\n' @@ -506,7 +512,10 @@ class TestSerde(unittest.TestCase): snippets[1].result, "This is another test\n" + "with two lines too" ) - self.assertEqual(snippets[2].name, None) + self.assertEqual( + snippets[2].name, + None + ) self.assertEqual( snippets[2].content, "/* This code has to be escaped to\n"