mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1623741 - [mozlint] Use python3 and include mozfile now that mozversioncontrol uses it r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D67551 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
5f29a6d696
commit
83b72d6d87
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
@ -11,7 +11,7 @@ import sys
|
||||
here = os.path.dirname(os.path.realpath(__file__))
|
||||
topsrcdir = os.path.join(here, os.pardir, os.pardir)
|
||||
|
||||
EXTRA_PATHS = ("python/mozversioncontrol", "python/mozbuild",)
|
||||
EXTRA_PATHS = ("python/mozversioncontrol", "python/mozbuild", "testing/mozbase/mozfile",)
|
||||
sys.path[:0] = [os.path.join(topsrcdir, p) for p in EXTRA_PATHS]
|
||||
|
||||
from mozversioncontrol import get_repository_object, InvalidRepoPath
|
||||
@ -36,7 +36,7 @@ def run_clang_format(hooktype, changedFiles):
|
||||
path_list = []
|
||||
for filename in sorted(changedFiles):
|
||||
# Ignore files unsupported in clang-format
|
||||
if filename.endswith(extensions):
|
||||
if filename.decode().endswith(extensions):
|
||||
path_list.append(filename)
|
||||
|
||||
if not path_list:
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
@ -11,7 +11,7 @@ import sys
|
||||
here = os.path.dirname(os.path.realpath(__file__))
|
||||
topsrcdir = os.path.join(here, os.pardir, os.pardir)
|
||||
|
||||
EXTRA_PATHS = ("python/mozversioncontrol", "python/mozbuild",)
|
||||
EXTRA_PATHS = ("python/mozversioncontrol", "python/mozbuild", "testing/mozbase/mozfile",)
|
||||
sys.path[:0] = [os.path.join(topsrcdir, p) for p in EXTRA_PATHS]
|
||||
|
||||
from mozversioncontrol import get_repository_object, InvalidRepoPath
|
||||
@ -31,7 +31,7 @@ def run_js_format(hooktype, changedFiles):
|
||||
path_list = []
|
||||
for filename in sorted(changedFiles):
|
||||
# Ignore files unsupported in eslint and prettier
|
||||
if filename.endswith(extensions):
|
||||
if filename.decode().endswith(extensions):
|
||||
path_list.append(filename)
|
||||
|
||||
if not path_list:
|
||||
|
Loading…
Reference in New Issue
Block a user