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

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

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

Modified: trunk/docutils/.ruff.toml
===================================================================
--- trunk/docutils/.ruff.toml	2024-08-01 20:55:40 UTC (rev 9832)
+++ trunk/docutils/.ruff.toml	2024-08-01 21:19:10 UTC (rev 9833)
@@ -18,6 +18,7 @@
     "PIE",  # flake8-pie
     "PT",   # flake8-pytest
     "RSE",  # flake8-raise
+    "SLOT", # flake8-slots
     "W",    # pycodestyle
 ]
 ignore = [

Modified: trunk/docutils/docutils/__init__.py
===================================================================
--- trunk/docutils/docutils/__init__.py	2024-08-01 20:55:40 UTC (rev 9832)
+++ trunk/docutils/docutils/__init__.py	2024-08-01 21:19:10 UTC (rev 9833)
@@ -104,6 +104,8 @@
 
 class VersionInfo(namedtuple('VersionInfo',
                              'major minor micro releaselevel serial release')):
+    __slots__ = ()
+
     major: int
     minor: int
     micro: int

Modified: trunk/docutils/docutils/nodes.py
===================================================================
--- trunk/docutils/docutils/nodes.py	2024-08-01 20:55:40 UTC (rev 9832)
+++ trunk/docutils/docutils/nodes.py	2024-08-01 21:19:10 UTC (rev 9833)
@@ -392,7 +392,7 @@
             return None
 
 
-class Text(Node, str):
+class Text(Node, str):  # NoQA: SLOT000 (Node doesn't define __slots__)
     """
     Instances are terminal nodes (leaves) containing text only; no child
     nodes or attributes.  Initialize by passing a string to the constructor.

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.