diff options
author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2019-08-26 16:42:06 +0000 |
---|---|---|
committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2019-08-26 16:42:06 +0000 |
commit | 960f5935e9319d3348d7ddb32f6608a3c120426c (patch) | |
tree | 6507e13512f3a64c05a71396773b89e55f685109 | |
parent | 40e280dd045c856b4ef34942126677639a457591 (diff) | |
download | docutils-960f5935e9319d3348d7ddb32f6608a3c120426c.tar.gz |
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
-rw-r--r-- | docutils/docutils/utils/math/math2html.py | 8 | ||||
-rw-r--r-- | docutils/tools/dev/generate_punctuation_chars.py | 11 | ||||
-rw-r--r-- | docutils/tox.ini | 5 |
3 files changed, 9 insertions, 15 deletions
diff --git a/docutils/docutils/utils/math/math2html.py b/docutils/docutils/utils/math/math2html.py index 49671655c..4a7209d5f 100644 --- a/docutils/docutils/utils/math/math2html.py +++ b/docutils/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/docutils/tools/dev/generate_punctuation_chars.py b/docutils/tools/dev/generate_punctuation_chars.py index 8853c850a..55349016d 100644 --- a/docutils/tools/dev/generate_punctuation_chars.py +++ b/docutils/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 # ------ # diff --git a/docutils/tox.ini b/docutils/tox.ini index 746181a2a..e575cb7dd 100644 --- a/docutils/tox.ini +++ b/docutils/tox.ini @@ -112,3 +112,8 @@ commands = ignore = E101,E111,E114,E115,E116,E117,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E201,E202,E203,E211,E221,E222,E225,E226,E228,E231,E241,E251,E261,E262,E265,E266,E271,E301,E302,E303,E305,E306,E401,E402,E501,E502,E701,E704,E711,E713,E721,E722,E731,E741,W191,W291,W293,W391,W503,W504,W605,F401,F841 exclude = .venv,.tox,dist,*egg,build max-complexity = 35 +# Some rules are disabled for specific files (requires flake8 3.7.0) +# +# F821, disabled due to use of 'settings_overrides' +per-file-ignores = + docutils/test/functional/tests/*:F821 |