Bug 1681096 - python3 - pylint --py3k - W1612: unicode built-in referenced (unicode-builtin) r=jmaher

Differential Revision: https://phabricator.services.mozilla.com/D99082
This commit is contained in:
Bob Clary 2020-12-08 16:28:08 +00:00
parent a9034d169d
commit f3712b2973
3 changed files with 5 additions and 2 deletions

View File

@ -4,6 +4,7 @@
from __future__ import absolute_import, print_function, unicode_literals
import six
import os
from argparse import Namespace
from collections import defaultdict
@ -46,7 +47,8 @@ def create_manifest(tmpdir, build_obj):
def inner(string, name="manifest.ini"):
manifest = tmpdir.join(name)
manifest.write(string, ensure=True)
path = unicode(manifest)
# pylint --py3k: W1612
path = six.text_type(manifest)
return TestManifest(manifests=(path,), strict=False, rootdir=tmpdir.strpath)
return inner

View File

@ -43,6 +43,7 @@ else:
def u(s):
return unicode(s)
# pylint: disable=W1612
unicode = unicode

View File

@ -90,7 +90,7 @@ PY3 = sys.version_info[0] == 3
if PY3:
text_type = str
else:
text_type = unicode # noqa
text_type = unicode # noqa pylint: disable=W1612
def ancestors(path, depth=0):