summaryrefslogtreecommitdiff
path: root/sphinx/util/nodes.py
diff options
context:
space:
mode:
authorAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-12-29 23:44:47 +0000
committerAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-12-29 23:53:48 +0000
commitb5357774a7c4594b22a499fa02d28e8014c932ad (patch)
tree813ad5918ca05eaedea56ba81c8c2f0364f0a507 /sphinx/util/nodes.py
parentb89c33fc0a62419e08a1b4af47f1b564ced92620 (diff)
downloadsphinx-git-b5357774a7c4594b22a499fa02d28e8014c932ad.tar.gz
Enable Ruff's pylint checks
Also fix two PLW0602 warnings (``global`` without assignment) and five PLW0120 warnings (else clause on loop without break).
Diffstat (limited to 'sphinx/util/nodes.py')
-rw-r--r--sphinx/util/nodes.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py
index cf8287f0b..9494b61de 100644
--- a/sphinx/util/nodes.py
+++ b/sphinx/util/nodes.py
@@ -525,8 +525,7 @@ def find_pending_xref_condition(node: addnodes.pending_xref, condition: str
if (isinstance(subnode, addnodes.pending_xref_condition) and
subnode.get('condition') == condition):
return subnode
- else:
- return None
+ return None
def make_refnode(builder: "Builder", fromdocname: str, todocname: str, targetid: str,