You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2020/02/10 22:45:03 UTC
[allura] 32/41: [#8349] python-modernize -n -w --no-diffs -f types .
This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch db/8349
in repository https://gitbox.apache.org/repos/asf/allura.git
commit 2163e969fd6f21d672d239f69d613112dd6a4620
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Mon Feb 10 15:26:33 2020 -0500
[#8349] python-modernize -n -w --no-diffs -f types .
---
Allura/allura/lib/AsciiDammit.py | 2 +-
Allura/allura/lib/utils.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Allura/allura/lib/AsciiDammit.py b/Allura/allura/lib/AsciiDammit.py
index db0604c..131f3a0 100644
--- a/Allura/allura/lib/AsciiDammit.py
+++ b/Allura/allura/lib/AsciiDammit.py
@@ -176,7 +176,7 @@ def _repl(match, html=0):
"Replace the matched character with its HTML or ASCII equivalent."
g = match.group(0)
a = CHARS.get(g, g)
- if isinstance(a, types.TupleType):
+ if isinstance(a, tuple):
a = a[html]
if html:
a = '&' + a + ';'
diff --git a/Allura/allura/lib/utils.py b/Allura/allura/lib/utils.py
index 7cf1526..ab7247a 100644
--- a/Allura/allura/lib/utils.py
+++ b/Allura/allura/lib/utils.py
@@ -790,7 +790,7 @@ def smart_str(s, encoding='utf-8', strings_only=False, errors='strict'):
This function was borrowed from Django
"""
- if strings_only and isinstance(s, (types.NoneType, int)):
+ if strings_only and isinstance(s, (type(None), int)):
return s
elif not isinstance(s, six.string_types):
try: