SF.net SVN: docutils:[9832 ] trunk/docutils

aa-turner--- via Docutils-checkins <[email protected]>
Newsgroups gmane.text.docutils.cvs
Message-ID <[email protected]>
Revision: 9832
          http://sourceforge.net/p/docutils/code/9832
Author:   aa-turner
Date:     2024-08-01 20:55:40 +0000 (Thu, 01 Aug 2024)
Log Message:
-----------
Enable the flake8-raise linter in Ruff

Modified Paths:
--------------
    trunk/docutils/.ruff.toml
    trunk/docutils/docutils/writers/odf_odt/__init__.py

Modified: trunk/docutils/.ruff.toml
===================================================================
--- trunk/docutils/.ruff.toml	2024-08-01 20:53:57 UTC (rev 9831)
+++ trunk/docutils/.ruff.toml	2024-08-01 20:55:40 UTC (rev 9832)
@@ -17,6 +17,7 @@
     "PGH",  # pygrep-hooks
     "PIE",  # flake8-pie
     "PT",   # flake8-pytest
+    "RSE",  # flake8-raise
     "W",    # pycodestyle
 ]
 ignore = [

Modified: trunk/docutils/docutils/writers/odf_odt/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/odf_odt/__init__.py	2024-08-01 20:53:57 UTC (rev 9831)
+++ trunk/docutils/docutils/writers/odf_odt/__init__.py	2024-08-01 20:55:40 UTC (rev 9832)
@@ -1743,7 +1743,7 @@
         self.list_level -= 1
 
     def visit_caption(self, node):
-        raise nodes.SkipChildren()
+        raise nodes.SkipChildren
 
     def depart_caption(self, node) -> None:
         pass
@@ -1802,7 +1802,7 @@
         el = self.append_p('deflist-term-%d' % self.def_list_level)
         el.text = node.astext()
         self.set_current_element(el)
-        raise nodes.SkipChildren()
+        raise nodes.SkipChildren
 
     def depart_term(self, node) -> None:
         self.set_to_parent()
@@ -2039,7 +2039,7 @@
                 })
                 el2.text = footnote_char
             self.footnote_ref_dict[id] = el1
-        raise nodes.SkipChildren()
+        raise nodes.SkipChildren
 
     def depart_footnote_reference(self, node) -> None:
         pass
@@ -2079,7 +2079,7 @@
 
     def visit_label(self, node):
         if isinstance(node.parent, docutils.nodes.footnote):
-            raise nodes.SkipChildren()
+            raise nodes.SkipChildren
         elif self.citation_id is not None:
             el = self.append_p('textbody')
             self.set_current_element(el)
@@ -2809,7 +2809,7 @@
         el1 = SubElement(el, 'text:p', attrib={
             'text:style-name': 'Table_20_Contents'})
         el1.text = node.astext()
-        raise nodes.SkipChildren()
+        raise nodes.SkipChildren
 
     def depart_description(self, node) -> None:
         pass
@@ -2864,7 +2864,7 @@
                         pass
                     else:
                         self.current_element.append(el1)
-        raise nodes.SkipChildren()
+        raise nodes.SkipChildren
 
     def depart_raw(self, node) -> None:
         if self.in_header:
@@ -2949,7 +2949,7 @@
         self.set_to_parent()
 
     def visit_substitution_definition(self, node):
-        raise nodes.SkipChildren()
+        raise nodes.SkipChildren
 
     def depart_substitution_definition(self, node) -> None:
         pass
@@ -3207,7 +3207,7 @@
         el = self.append_child('text:span', attrib={
             'text:style-name': self.rststyle('quotation')})
         el.text = self.encode(node.astext())
-        raise nodes.SkipChildren()
+        raise nodes.SkipChildren
 
     def depart_title_reference(self, node) -> None:
         pass

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.