summaryrefslogtreecommitdiff
path: root/sphinx/util
diff options
context:
space:
mode:
authorAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-12-30 00:06:11 +0000
committerAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-12-30 00:06:11 +0000
commitb91f6617edc2cce408fef216ee7662b37883a8c5 (patch)
tree12ee5f85d0d4f566b32f3932faf731558240281e /sphinx/util
parent2c97bfaa196205d32bf4224a320b9b90208e5a1c (diff)
downloadsphinx-git-b91f6617edc2cce408fef216ee7662b37883a8c5.tar.gz
Enable Ruff's pylint 'PLC2201' check
Address all cases where the comparison order check is violated
Diffstat (limited to 'sphinx/util')
-rw-r--r--sphinx/util/rst.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/util/rst.py b/sphinx/util/rst.py
index 87252fa39..800d15f5b 100644
--- a/sphinx/util/rst.py
+++ b/sphinx/util/rst.py
@@ -98,7 +98,7 @@ def prepend_prolog(content: StringList, prolog: str) -> None:
def append_epilog(content: StringList, epilog: str) -> None:
"""Append a string to content body as epilog."""
if epilog:
- if 0 < len(content):
+ if len(content) > 0:
source, lineno = content.info(-1)
else:
source = '<generated>'