void-packages/srcpkgs/python-docutils/patches/0015-py3-Replace-foo.has_ke...

39 lines
1.4 KiB
Diff

From 006366f7baaf84baf0158ccd9036c9a53d27c965 Mon Sep 17 00:00:00 2001
From: Stephen Finucane <stephen@that.guru>
Date: Mon, 26 Aug 2019 23:12:56 +0000
Subject: [PATCH 15/26] py3: Replace 'foo.has_key(bar)' with 'bar in foo'
Signed-off-by: Stephen Finucane <stephen@that.guru>
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8362 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Signed-off-by: Doan Tran Cong Danh <congdanhqx@gmail.com>
---
docutils/writers/manpage.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docutils/writers/manpage.py b/docutils/writers/manpage.py
index b39cf25..8bb025c 100644
--- a/docutils/writers/manpage.py
+++ b/docutils/writers/manpage.py
@@ -312,7 +312,7 @@ class Translator(nodes.NodeVisitor):
def __init__(self, style):
self._style = style
- if node.has_key('start'):
+ if 'start' in node:
self._cnt = node['start'] - 1
else:
self._cnt = 0
@@ -354,7 +354,7 @@ class Translator(nodes.NodeVisitor):
def __repr__(self):
return 'enum_style-%s' % list(self._style)
- if node.has_key('enumtype'):
+ if 'enumtype' in node:
self._list_char.append(enum_char(node['enumtype']))
else:
self._list_char.append(enum_char('bullet'))
--
2.24.0.375.geb5ae68d41