SF.net SVN: docutils:[9612 ] trunk/docutils/docutils/n odes.py
milde--- via Docutils-checkins <[email protected]>
| Newsgroups | gmane.text.docutils.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 9612
http://sourceforge.net/p/docutils/code/9612
Author: milde
Date: 2024-04-05 23:07:13 +0000 (Fri, 05 Apr 2024)
Log Message:
-----------
Use "True" instead of 1 for booleans. Correct comment.
Modified Paths:
--------------
trunk/docutils/docutils/nodes.py
Modified: trunk/docutils/docutils/nodes.py
===================================================================
--- trunk/docutils/docutils/nodes.py 2024-04-03 17:30:51 UTC (rev 9611)
+++ trunk/docutils/docutils/nodes.py 2024-04-05 23:07:13 UTC (rev 9612)
@@ -1056,7 +1056,7 @@
def note_referenced_by(self, name=None, id=None):
"""Note that this Element has been referenced by its name
`name` or id `id`."""
- self.referenced = 1
+ self.referenced = True
# Element.expect_referenced_by_* dictionaries map names or ids
# to nodes whose ``referenced`` attribute is set to true as
# soon as this node is referenced by the given name or id.
@@ -1065,10 +1065,10 @@
by_id = getattr(self, 'expect_referenced_by_id', {}).get(id)
if by_name:
assert name is not None
- by_name.referenced = 1
+ by_name.referenced = True
if by_id:
assert id is not None
- by_id.referenced = 1
+ by_id.referenced = True
@classmethod
def is_not_list_attribute(cls, attr):
@@ -2276,9 +2276,9 @@
def dupname(node, name):
node['dupnames'].append(name)
node['names'].remove(name)
- # Assume that this method is referenced, even though it isn't; we
- # don't want to throw unnecessary system_messages.
- node.referenced = 1
+ # Assume that `node` is referenced, even though it isn't;
+ # we don't want to throw unnecessary system_messages.
+ node.referenced = True
def fully_normalize_name(name):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.