mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 13:56:29 +00:00
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:
parent
a9034d169d
commit
f3712b2973
@ -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
|
||||
|
@ -43,6 +43,7 @@ else:
|
||||
def u(s):
|
||||
return unicode(s)
|
||||
|
||||
# pylint: disable=W1612
|
||||
unicode = unicode
|
||||
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user