void-packages/srcpkgs/python-docutils/patches/0005-py3-Resolve-some-addit...

81 lines
2.6 KiB
Diff

From 6bd112802f857b32764afe87ce7828db50077086 Mon Sep 17 00:00:00 2001
From: Stephen Finucane <stephen@that.guru>
Date: Tue, 19 Nov 2019 23:52:14 +0700
Subject: [PATCH 05/26] py3: Resolve some additional undefined symbols
Found with flake8
Signed-off-by: Stephen Finucane <stephen@that.guru>
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8352 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Signed-off-by: Doan Tran Cong Danh <congdanhqx@gmail.com>
---
docutils/utils/math/math2html.py | 8 ++++----
tools/dev/generate_punctuation_chars.py | 11 -----------
2 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/docutils/utils/math/math2html.py b/docutils/utils/math/math2html.py
index 4967165..4a7209d 100644
--- a/docutils/utils/math/math2html.py
+++ b/docutils/utils/math/math2html.py
@@ -1624,7 +1624,7 @@ class TaggedOutput(ContentsOutput):
def open(self, container):
"Get opening line."
- if not self.checktag():
+ if not self.checktag(container):
return ''
open = '<' + self.tag + '>'
if self.breaklines:
@@ -1633,7 +1633,7 @@ class TaggedOutput(ContentsOutput):
def close(self, container):
"Get closing line."
- if not self.checktag():
+ if not self.checktag(container):
return ''
close = '</' + self.tag.split()[0] + '>'
if self.breaklines:
@@ -1642,14 +1642,14 @@ class TaggedOutput(ContentsOutput):
def selfclosing(self, container):
"Get self-closing line."
- if not self.checktag():
+ if not self.checktag(container):
return ''
selfclosing = '<' + self.tag + '/>'
if self.breaklines:
return selfclosing + '\n'
return selfclosing
- def checktag(self):
+ def checktag(self, container):
"Check that the tag is valid."
if not self.tag:
Trace.error('No tag in ' + unicode(container))
diff --git a/tools/dev/generate_punctuation_chars.py b/tools/dev/generate_punctuation_chars.py
index 5947fe5..a30c5ca 100644
--- a/tools/dev/generate_punctuation_chars.py
+++ b/tools/dev/generate_punctuation_chars.py
@@ -319,17 +319,6 @@ def print_differences(old, new, name):
else:
print('%s unchanged' % name)
-def print_quote_pairs():
- pairs = [(o,c) for o,c in quote_pairs.items()]
- for o,c in sorted(pairs):
- print((u'%s %s' % (o,c)).encode('utf8'))
-
- # # Test open/close matching:
- # for i in range(min(len(openers),len(closers))):
- # print('%4d %s %s' % (i, openers[i].encode('utf8'),
- # closers[i].encode('utf8'))
-
-
# Output
# ------
#
--
2.24.0.375.geb5ae68d41