diff --git a/org_rw/org_rw.py b/org_rw/org_rw.py index b85118b..7129393 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 1853d7b..5a0bc53 100644 --- a/tests/test_org.py +++ b/tests/test_org.py @@ -480,10 +480,7 @@ 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' @@ -498,10 +495,7 @@ 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' @@ -512,10 +506,7 @@ 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"