зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 5 changesets (bug 1811850) for causing linting bustages(bugzilla) CLOSED TREE
Backed out changeset e8fcfc7f8108 (bug 1811850) Backed out changeset f8950d716c9e (bug 1811850) Backed out changeset f650123cc188 (bug 1811850) Backed out changeset d96f90c2c58b (bug 1811850) Backed out changeset c3b0f9666183 (bug 1811850)
This commit is contained in:
Родитель
6a4ef6bc43
Коммит
c1b52fd95e
|
@ -0,0 +1,130 @@
|
|||
[flake8]
|
||||
max-line-length = 99
|
||||
exclude =
|
||||
# These paths should be triaged and either fixed or moved to the list below.
|
||||
devtools/shared,
|
||||
dom/bindings/Codegen.py,
|
||||
dom/bindings/parser/WebIDL.py,
|
||||
dom/bindings/parser/tests/test_arraybuffer.py,
|
||||
dom/bindings/parser/tests/test_securecontext_extended_attribute.py,
|
||||
gfx/tests,
|
||||
ipc/ipdl/ipdl,
|
||||
layout/base/tests/marionette,
|
||||
layout/reftests/border-image,
|
||||
layout/reftests/fonts,
|
||||
layout/reftests/w3c-css,
|
||||
layout/style,
|
||||
media/libdav1d/generate_source.py,
|
||||
moz.configure,
|
||||
netwerk/dns/prepare_tlds.py,
|
||||
netwerk/protocol/http/make_incoming_tables.py,
|
||||
python/l10n/fluent_migrations,
|
||||
security/manager/ssl/tests/unit,
|
||||
servo/components/style,
|
||||
testing/condprofile/condprof/android.py,
|
||||
testing/condprofile/condprof/creator.py,
|
||||
testing/condprofile/condprof/desktop.py,
|
||||
testing/condprofile/condprof/runner.py,
|
||||
testing/condprofile/condprof/scenarii/heavy.py,
|
||||
testing/condprofile/condprof/scenarii/settled.py,
|
||||
testing/condprofile/condprof/scenarii/synced.py
|
||||
testing/condprofile/condprof/helpers.py,
|
||||
testing/jsshell/benchmark.py,
|
||||
testing/marionette/mach_commands.py,
|
||||
testing/mozharness/docs,
|
||||
testing/mozharness/examples,
|
||||
testing/mozharness/external_tools,
|
||||
testing/mozharness/mach_commands.py,
|
||||
testing/mozharness/manifestparser,
|
||||
testing/mozharness/mozprocess,
|
||||
testing/mozharness/setup.py,
|
||||
testing/parse_build_tests_ccov.py,
|
||||
testing/runtimes/writeruntimes.py,
|
||||
testing/tools/iceserver/iceserver.py,
|
||||
testing/tools/websocketprocessbridge/websocketprocessbridge.py,
|
||||
toolkit/components/featuregates,
|
||||
toolkit/content/tests/chrome/file_about_networking_wsh.py,
|
||||
toolkit/library/build/dependentlibs.py,
|
||||
toolkit/locales/generate_update_locale.py,
|
||||
toolkit/mozapps,
|
||||
toolkit/moz.configure,
|
||||
toolkit/nss.configure,
|
||||
|
||||
# mako files are not really python files
|
||||
*.mako.py,
|
||||
|
||||
# These paths are intentionally excluded (not necessarily for good reason).
|
||||
build/moz.configure/*.configure,
|
||||
build/pymake/,
|
||||
browser/extensions/mortar/ppapi/,
|
||||
browser/moz.configure,
|
||||
dom/canvas/test/webgl-conf/checkout/closure-library/,
|
||||
editor/libeditor/tests/browserscope/,
|
||||
intl/icu/,
|
||||
ipc/chromium/src/third_party/,
|
||||
js/*.configure,
|
||||
gfx/angle/,
|
||||
gfx/harfbuzz,
|
||||
gfx/skia/,
|
||||
memory/moz.configure,
|
||||
mobile/android/*.configure,
|
||||
node_modules,
|
||||
python/mozbuild/mozbuild/test/configure/data,
|
||||
security/nss/,
|
||||
testing/marionette/harness/marionette_harness/runner/mixins,
|
||||
testing/marionette/harness/marionette_harness/tests,
|
||||
testing/mochitest/pywebsocket3,
|
||||
testing/mozharness/configs/test/test_malformed.py,
|
||||
testing/web-platform/tests,
|
||||
tools/lint/test/files,
|
||||
tools/crashreporter/*.configure,
|
||||
.ycm_extra_conf.py,
|
||||
|
||||
# See:
|
||||
# - http://flake8.pycqa.org/en/latest/user/error-codes.html
|
||||
# - http://pep8.readthedocs.io/en/latest/intro.html#configuration
|
||||
ignore =
|
||||
# These should be triaged and either fixed or moved to the list below.
|
||||
W605, W606,
|
||||
# These are intentionally disabled (not necessarily for good reason).
|
||||
# F723: syntax error in type comment
|
||||
# text contains quotes which breaks our custom JSON formatter
|
||||
F723, E704, E741,
|
||||
|
||||
# black is already in charge of formatting, no need to start a formatter
|
||||
# battle here
|
||||
E1, W1, E2, W2, E3, W3, E4, W4, E5, W5
|
||||
|
||||
per-file-ignores =
|
||||
# These paths are intentionally excluded.
|
||||
ipc/ipdl/*: F403, F405
|
||||
layout/tools/reftest/selftest/conftest.py: F811
|
||||
# cpp_eclipse has a lot of multi-line embedded XML which exceeds line length
|
||||
python/mozbuild/mozbuild/backend/cpp_eclipse.py: E501
|
||||
testing/firefox-ui/**/__init__.py: F401
|
||||
testing/marionette/**/__init__.py: F401
|
||||
testing/mochitest/tests/python/conftest.py: F811
|
||||
testing/mozbase/manifestparser/tests/test_filters.py: E731
|
||||
testing/mozbase/mozlog/tests/test_formatters.py: E501
|
||||
testing/mozharness/configs/*: E124, E127, E128, E131, E231, E261, E265, E266, E501, W391
|
||||
|
||||
# These paths contain Python-2 only syntax which cause errors since flake8
|
||||
# is run with Python 3.
|
||||
build/compare-mozconfig/compare-mozconfigs.py: F821
|
||||
build/midl.py: F821
|
||||
build/pgo/genpgocert.py: F821
|
||||
config/MozZipFile.py: F821
|
||||
config/check_source_count.py: F821
|
||||
config/tests/unitMozZipFile.py: F821
|
||||
ipc/pull-chromium.py: F633
|
||||
js/src/**: F633, F821
|
||||
python/mozbuild/mozbuild/action/dump_env.py: F821
|
||||
python/mozbuild/mozbuild/dotproperties.py: F821
|
||||
python/mozbuild/mozbuild/testing.py: F821
|
||||
python/mozbuild/mozbuild/util.py: F821
|
||||
testing/mozharness/mozharness/mozilla/testing/android.py: F821
|
||||
testing/mochitest/runtests.py: F821
|
||||
|
||||
builtins =
|
||||
# For GDB extensions
|
||||
gdb
|
|
@ -225,9 +225,6 @@ _OPT\.OBJ/
|
|||
# Unit test
|
||||
\.pytest_cache/
|
||||
|
||||
# Ruff
|
||||
\.ruff_cache/
|
||||
|
||||
# Ignore files created when running a reftest.
|
||||
^lextab.py$
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
[settings]
|
||||
profile=black
|
|
@ -90,16 +90,27 @@ In this document, we try to list these all tools.
|
|||
- Meta bug
|
||||
- More info
|
||||
- Upstream
|
||||
* - ruff
|
||||
- Yes
|
||||
- `bug 1811850 <https://bugzilla.mozilla.org/show_bug.cgi?id=1811850>`__
|
||||
- :ref:`ruff`
|
||||
- https://github.com/charliermarsh/ruff
|
||||
* - Flake8
|
||||
- Yes (with `autopep8 <https://github.com/hhatto/autopep8>`_)
|
||||
- `bug 1155970 <https://bugzilla.mozilla.org/show_bug.cgi?id=1155970>`__
|
||||
- :ref:`Flake8`
|
||||
- http://flake8.pycqa.org/
|
||||
* - black
|
||||
- Yes
|
||||
- `bug 1555560 <https://bugzilla.mozilla.org/show_bug.cgi?id=1555560>`__
|
||||
- :ref:`black`
|
||||
- https://black.readthedocs.io/en/stable
|
||||
* - pylint
|
||||
-
|
||||
- `bug 1623024 <https://bugzilla.mozilla.org/show_bug.cgi?id=1623024>`__
|
||||
- :ref:`pylint`
|
||||
- https://www.pylint.org/
|
||||
* - Python 2/3 compatibility check
|
||||
-
|
||||
- `bug 1496527 <https://bugzilla.mozilla.org/show_bug.cgi?id=1496527>`__
|
||||
- :ref:`Python 2/3 compatibility check`
|
||||
-
|
||||
|
||||
|
||||
.. list-table:: Rust
|
||||
:widths: 20 20 20 20 20
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
Flake8
|
||||
======
|
||||
|
||||
`Flake8 <https://flake8.pycqa.org/en/latest/index.html>`__ is a popular lint wrapper for python. Under the hood, it runs three other tools and
|
||||
combines their results:
|
||||
|
||||
* `pep8 <http://pep8.readthedocs.io/en/latest/>`__ for checking style
|
||||
* `pyflakes <https://github.com/pyflakes/pyflakes>`__ for checking syntax
|
||||
* `mccabe <https://github.com/pycqa/mccabe>`__ for checking complexity
|
||||
|
||||
|
||||
Run Locally
|
||||
-----------
|
||||
|
||||
The mozlint integration of flake8 can be run using mach:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
$ mach lint --linter flake8 <file paths>
|
||||
|
||||
Alternatively, omit the ``--linter flake8`` and run all configured linters, which will include
|
||||
flake8.
|
||||
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
Path configuration is defined in the root `.flake8`_ file. Please update this file rather than
|
||||
``tools/lint/flake8.yml`` if you need to exclude a new path. For an overview of the supported
|
||||
configuration, see `flake8's documentation`_.
|
||||
|
||||
.. _.flake8: https://searchfox.org/mozilla-central/source/.flake8
|
||||
.. _flake8's documentation: https://flake8.pycqa.org/en/latest/user/configuration.html
|
||||
|
||||
Autofix
|
||||
-------
|
||||
|
||||
The flake8 linter provides a ``--fix`` option. It is based on `autopep8 <https://github.com/hhatto/autopep8>`__.
|
||||
Please note that autopep8 does NOT fix all issues reported by flake8.
|
||||
|
||||
|
||||
Sources
|
||||
-------
|
||||
|
||||
* `Configuration (YAML) <https://searchfox.org/mozilla-central/source/tools/lint/flake8.yml>`_
|
||||
* `Source <https://searchfox.org/mozilla-central/source/tools/lint/python/flake8.py>`_
|
|
@ -0,0 +1,33 @@
|
|||
pylint
|
||||
======
|
||||
|
||||
`pylint <https://www.pylint.org/>`__ is a popular linter for python. It is now the default python
|
||||
linter in VS Code.
|
||||
|
||||
Please note that we also have :ref:`Flake8` available as a linter.
|
||||
|
||||
Run Locally
|
||||
-----------
|
||||
|
||||
The mozlint integration of pylint can be run using mach:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
$ mach lint --linter pylint <file paths>
|
||||
|
||||
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
To enable pylint on new directory, add the path to the include
|
||||
section in the `pylint.yml <https://searchfox.org/mozilla-central/source/tools/lint/pylint.yml>`_ file.
|
||||
|
||||
We enabled the same Pylint rules as `VS Code <https://code.visualstudio.com/docs/python/linting#_pylint>`_.
|
||||
See in `pylint.py <https://searchfox.org/mozilla-central/source/tools/lint/python/pylint.py>`_ for the full list
|
||||
|
||||
Sources
|
||||
-------
|
||||
|
||||
* `Configuration (YAML) <https://searchfox.org/mozilla-central/source/tools/lint/pylint.yml>`_
|
||||
* `Source <https://searchfox.org/mozilla-central/source/tools/lint/python/pylint.py>`_
|
|
@ -1,44 +0,0 @@
|
|||
Ruff
|
||||
====
|
||||
|
||||
`Ruff <https://github.com/charliermarsh/ruff>`_ is an extremely fast Python
|
||||
linter and formatter, written in Rust. It can process all of mozilla-central in
|
||||
under a second, and implements rule sets from a large array of Python linters
|
||||
and formatters, including:
|
||||
|
||||
* flake8 (pycodestyle, pyflakes and mccabe)
|
||||
* isort
|
||||
* pylint
|
||||
* pyupgrade
|
||||
* and many many more!
|
||||
|
||||
Run Locally
|
||||
-----------
|
||||
|
||||
The mozlint integration of ruff can be run using mach:
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
$ mach lint --linter ruff <file paths>
|
||||
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
Ruff is configured in the root `pyproject.toml`_ file. Additionally, ruff will
|
||||
pick up any ``pyproject.toml`` or ``ruff.toml`` files in subdirectories. The
|
||||
settings in these files will only apply to files contained within these
|
||||
subdirs. For more details on configuration discovery, see the `configuration
|
||||
documentation`_.
|
||||
|
||||
For a list of options, see the `settings documentation`_.
|
||||
|
||||
Sources
|
||||
-------
|
||||
|
||||
* `Configuration (YAML) <https://searchfox.org/mozilla-central/source/tools/lint/ruff.yml>`_
|
||||
* `Source <https://searchfox.org/mozilla-central/source/tools/lint/python/ruff.py>`_
|
||||
|
||||
.. _pyproject.toml: https://searchfox.org/mozilla-central/source/pyproject.toml
|
||||
.. _configuration documentation: https://beta.ruff.rs/docs/configuration/
|
||||
.. _settings documentation: https://beta.ruff.rs/docs/settings/
|
|
@ -9,7 +9,6 @@ allocated by the Jits.
|
|||
"""
|
||||
|
||||
import gdb
|
||||
|
||||
import mozilla.prettyprinters
|
||||
from mozilla.prettyprinters import pretty_printer, ptr_pretty_printer
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
# Pretty-printers for GCCellPtr values.
|
||||
|
||||
import gdb
|
||||
|
||||
import mozilla.prettyprinters
|
||||
from mozilla.prettyprinters import pretty_printer
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
# Pretty-printers for InterpreterRegs.
|
||||
|
||||
import gdb
|
||||
|
||||
import mozilla.prettyprinters as prettyprinters
|
||||
|
||||
prettyprinters.clear_module_printers(__name__)
|
||||
|
|
|
@ -17,7 +17,6 @@ import tempfile
|
|||
import time
|
||||
|
||||
import gdb
|
||||
|
||||
import mozilla.prettyprinters
|
||||
from mozilla.prettyprinters import pretty_printer
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
import re
|
||||
|
||||
import gdb
|
||||
|
||||
import mozilla.prettyprinters as prettyprinters
|
||||
from mozilla.CellHeader import get_header_ptr
|
||||
from mozilla.jsval import JSValue
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
# Pretty-printers for SpiderMonkey strings.
|
||||
|
||||
import gdb
|
||||
|
||||
import mozilla.prettyprinters
|
||||
from mozilla.CellHeader import get_header_length_and_flags
|
||||
from mozilla.prettyprinters import ptr_pretty_printer
|
||||
|
|
|
@ -8,7 +8,6 @@ print("Loading JavaScript value pretty-printers; see js/src/gdb/README.")
|
|||
print("If they cause trouble, type: disable pretty-printer .* SpiderMonkey")
|
||||
|
||||
import gdb.printing
|
||||
|
||||
import mozilla.ExecutableAllocator
|
||||
|
||||
# Import the pretty-printer modules. As a side effect, loading these
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
import gdb
|
||||
import gdb.types
|
||||
|
||||
import mozilla.prettyprinters
|
||||
from mozilla.prettyprinters import pretty_printer, ptr_pretty_printer
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ import struct
|
|||
|
||||
import gdb
|
||||
import gdb.types
|
||||
|
||||
import mozilla.prettyprinters
|
||||
from mozilla.prettyprinters import pretty_printer
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ import platform
|
|||
import gdb
|
||||
import gdb.types
|
||||
from gdb.FrameDecorator import FrameDecorator
|
||||
|
||||
from mozilla.JSObject import get_function_name, get_function_script
|
||||
from mozilla.prettyprinters import TypeCache
|
||||
|
||||
|
|
131
pyproject.toml
131
pyproject.toml
|
@ -1,131 +0,0 @@
|
|||
[tool.ruff]
|
||||
line-length = 99
|
||||
# See https://beta.ruff.rs/docs/rules/ for a full list of rules.
|
||||
select = [
|
||||
"E", "W", # pycodestyle
|
||||
"F", # pyflakes
|
||||
"I", # isort
|
||||
"PL", # pylint
|
||||
]
|
||||
ignore = [
|
||||
# These should be triaged and either fixed or moved to the list below.
|
||||
"E713", "E714", "W605",
|
||||
|
||||
# These are intentionally ignored (not necessarily for good reason).
|
||||
"E741",
|
||||
|
||||
# These are handled by black.
|
||||
"E1", "E4", "E5", "W2", "W5"
|
||||
]
|
||||
builtins = ["gdb"]
|
||||
exclude = [
|
||||
# These paths should be triaged and either fixed or moved to the list below.
|
||||
"devtools/shared",
|
||||
"dom/bindings/Codegen.py",
|
||||
"dom/bindings/parser/WebIDL.py",
|
||||
"dom/bindings/parser/tests/test_arraybuffer.py",
|
||||
"dom/bindings/parser/tests/test_securecontext_extended_attribute.py",
|
||||
"gfx/tests",
|
||||
"ipc/ipdl/ipdl",
|
||||
"layout/base/tests/marionette",
|
||||
"layout/reftests/border-image",
|
||||
"layout/reftests/fonts",
|
||||
"layout/reftests/w3c-css",
|
||||
"layout/style",
|
||||
"media/libdav1d/generate_source.py",
|
||||
"moz.configure",
|
||||
"netwerk/dns/prepare_tlds.py",
|
||||
"netwerk/protocol/http/make_incoming_tables.py",
|
||||
"python/l10n/fluent_migrations",
|
||||
"security/manager/ssl/tests/unit",
|
||||
"servo/components/style",
|
||||
"testing/condprofile/condprof/android.py",
|
||||
"testing/condprofile/condprof/creator.py",
|
||||
"testing/condprofile/condprof/desktop.py",
|
||||
"testing/condprofile/condprof/runner.py",
|
||||
"testing/condprofile/condprof/scenarii/heavy.py",
|
||||
"testing/condprofile/condprof/scenarii/settled.py",
|
||||
"testing/condprofile/condprof/scenarii/synced.p",
|
||||
"testing/condprofile/condprof/helpers.py",
|
||||
"testing/jsshell/benchmark.py",
|
||||
"testing/marionette/mach_commands.py",
|
||||
"testing/mozharness/docs",
|
||||
"testing/mozharness/examples",
|
||||
"testing/mozharness/external_tools",
|
||||
"testing/mozharness/mach_commands.py",
|
||||
"testing/mozharness/manifestparser",
|
||||
"testing/mozharness/mozprocess",
|
||||
"testing/mozharness/setup.py",
|
||||
"testing/parse_build_tests_ccov.py",
|
||||
"testing/runtimes/writeruntimes.py",
|
||||
"testing/tools/iceserver/iceserver.py",
|
||||
"testing/tools/websocketprocessbridge/websocketprocessbridge.py",
|
||||
"toolkit/components/featuregates",
|
||||
"toolkit/content/tests/chrome/file_about_networking_wsh.py",
|
||||
"toolkit/library/build/dependentlibs.py",
|
||||
"toolkit/locales/generate_update_locale.py",
|
||||
"toolkit/mozapps",
|
||||
"toolkit/moz.configure",
|
||||
"toolkit/nss.configure",
|
||||
|
||||
# mako files are not really python files
|
||||
"*.mako.py",
|
||||
|
||||
# These paths are intentionally excluded (not necessarily for good reason).
|
||||
"build/moz.configure/*.configure",
|
||||
"build/pymake/",
|
||||
"browser/extensions/mortar/ppapi/",
|
||||
"browser/moz.configure",
|
||||
"dom/canvas/test/webgl-conf/checkout/closure-library/",
|
||||
"editor/libeditor/tests/browserscope/",
|
||||
"intl/icu/",
|
||||
"ipc/chromium/src/third_party/",
|
||||
"js/*.configure",
|
||||
"gfx/angle/",
|
||||
"gfx/harfbuzz",
|
||||
"gfx/skia/",
|
||||
"memory/moz.configure",
|
||||
"mobile/android/*.configure",
|
||||
"node_modules",
|
||||
"python/mozbuild/mozbuild/test/configure/data",
|
||||
"security/nss/",
|
||||
"testing/marionette/harness/marionette_harness/runner/mixins",
|
||||
"testing/marionette/harness/marionette_harness/tests",
|
||||
"testing/mochitest/pywebsocket3",
|
||||
"testing/mozharness/configs/test/test_malformed.py",
|
||||
"testing/web-platform/tests",
|
||||
"tools/lint/test/files",
|
||||
"tools/crashreporter/*.configure",
|
||||
".ycm_extra_conf.py",
|
||||
]
|
||||
|
||||
[tool.ruff.per-file-ignores]
|
||||
# These paths are intentionally excluded.
|
||||
"dom/bindings/Configuration.py" = ["PLC3002"]
|
||||
"ipc/ipdl/*" = ["F403", "F405"]
|
||||
"layout/tools/reftest/selftest/conftest.py" = ["F811"]
|
||||
# cpp_eclipse has a lot of multi-line embedded XML which exceeds line length
|
||||
"python/mozbuild/mozbuild/backend/cpp_eclipse.py" = ["E501"]
|
||||
"testing/firefox-ui/**/__init__.py" = ["F401"]
|
||||
"testing/marionette/**/__init__.py" = ["F401"]
|
||||
"testing/mochitest/tests/python/conftest.py" = ["F811"]
|
||||
"testing/mozbase/manifestparser/tests/test_filters.py" = ["E731"]
|
||||
"testing/mozbase/mozinfo/mozinfo/mozinfo.py" = ["PLE0605"]
|
||||
"testing/mozbase/mozlog/tests/test_formatters.py" = ["E501"]
|
||||
"testing/mozharness/configs/*" = ["E501"]
|
||||
"**/*.configure" = ["F821"]
|
||||
# These paths contain Python-2 only syntax.
|
||||
"build/compare-mozconfig/compare-mozconfigs.py" = ["F821"]
|
||||
"build/midl.py" = ["F821"]
|
||||
"build/pgo/genpgocert.py" = ["F821"]
|
||||
"config/MozZipFile.py" = ["F821"]
|
||||
"config/check_source_count.py" = ["F821"]
|
||||
"config/tests/unitMozZipFile.py" = ["F821"]
|
||||
"ipc/pull-chromium.py" = ["F633"]
|
||||
"js/src/**" = ["F633", "F821"]
|
||||
"python/mozbuild/mozbuild/action/dump_env.py" = ["F821"]
|
||||
"python/mozbuild/mozbuild/dotproperties.py" = ["F821"]
|
||||
"python/mozbuild/mozbuild/testing.py" = ["F821"]
|
||||
"python/mozbuild/mozbuild/util.py" = ["F821"]
|
||||
"testing/mozharness/mozharness/mozilla/testing/android.py" = ["F821"]
|
||||
"testing/mochitest/runtests.py" = ["F821"]
|
|
@ -20,12 +20,12 @@ class GeckoPrettyPrinter(object):
|
|||
return wrapped
|
||||
|
||||
|
||||
import gdbpp.enumset # noqa: F401
|
||||
import gdbpp.linkedlist # noqa: F401
|
||||
import gdbpp.owningthread # noqa: F401
|
||||
import gdbpp.smartptr # noqa: F401
|
||||
import gdbpp.string # noqa: F401
|
||||
import gdbpp.tarray # noqa: F401
|
||||
import gdbpp.thashtable # noqa: F401
|
||||
import gdbpp.enumset # NOQA: F401
|
||||
import gdbpp.linkedlist # NOQA: F401
|
||||
import gdbpp.owningthread # NOQA: F401
|
||||
import gdbpp.smartptr # NOQA: F401
|
||||
import gdbpp.string # NOQA: F401
|
||||
import gdbpp.tarray # NOQA: F401
|
||||
import gdbpp.thashtable # NOQA: F401
|
||||
|
||||
gdb.printing.register_pretty_printer(None, GeckoPrettyPrinter.pp)
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import gdb
|
||||
|
||||
from gdbpp import GeckoPrettyPrinter
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import gdb
|
||||
|
||||
from gdbpp import GeckoPrettyPrinter
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import gdb
|
||||
|
||||
from gdbpp import GeckoPrettyPrinter
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[settings]
|
||||
profile=black
|
||||
known_first_party=lldbutils
|
|
@ -1,4 +0,0 @@
|
|||
extend = "../../pyproject.toml"
|
||||
|
||||
[isort]
|
||||
known-first-party = ["lldbutils"]
|
|
@ -0,0 +1,3 @@
|
|||
[settings]
|
||||
profile=black
|
||||
known_first_party=mach
|
|
@ -1,4 +0,0 @@
|
|||
extend = "../../pyproject.toml"
|
||||
|
||||
[isort]
|
||||
known-first-party = ["mach"]
|
|
@ -7,7 +7,6 @@ from textwrap import TextWrapper
|
|||
from mach.config import TYPE_CLASSES
|
||||
from mach.decorators import Command, CommandArgument
|
||||
|
||||
|
||||
# Interact with settings for mach.
|
||||
|
||||
# Currently, we only provide functionality to view what settings are
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
import os
|
||||
from unittest import mock
|
||||
|
||||
import pytest
|
||||
import pytest as pytest
|
||||
from buildconfig import topsrcdir
|
||||
from mozunit import main
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[settings]
|
||||
profile=black
|
||||
known_first_party=mozboot
|
|
@ -1,4 +0,0 @@
|
|||
extend = "../../pyproject.toml"
|
||||
|
||||
[isort]
|
||||
known-first-party = ["mozboot"]
|
|
@ -0,0 +1,3 @@
|
|||
[settings]
|
||||
profile=black
|
||||
known_first_party=mozbuild
|
|
@ -1,9 +0,0 @@
|
|||
extend = "../../pyproject.toml"
|
||||
src = [
|
||||
# Treat direct imports in the test modules as first party.
|
||||
"mozpack/test",
|
||||
"mozbuild/test",
|
||||
]
|
||||
|
||||
[isort]
|
||||
known-first-party = ["mozbuild"]
|
|
@ -9,7 +9,6 @@ from mach.decorators import Command, CommandArgument
|
|||
from mozbuild.shellutil import quote as shell_quote
|
||||
from mozbuild.shellutil import split as shell_split
|
||||
|
||||
|
||||
# Instropection commands.
|
||||
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ class NegativeOptionValue(OptionValue):
|
|||
return super(NegativeOptionValue, cls).__new__(cls, origin=origin)
|
||||
|
||||
def __init__(self, origin="unknown"):
|
||||
super(NegativeOptionValue, self).__init__(origin=origin)
|
||||
return super(NegativeOptionValue, self).__init__(origin=origin)
|
||||
|
||||
|
||||
class InvalidOptionError(Exception):
|
||||
|
|
|
@ -32,12 +32,9 @@ from mach.decorators import (
|
|||
from voluptuous import All, Boolean, Required, Schema
|
||||
|
||||
import mozbuild.settings # noqa need @SettingsProvider hook to execute
|
||||
from mozbuild.base import (
|
||||
BinaryNotFoundException,
|
||||
BuildEnvironmentNotFoundException,
|
||||
MozbuildObject,
|
||||
)
|
||||
from mozbuild.base import BinaryNotFoundException, BuildEnvironmentNotFoundException
|
||||
from mozbuild.base import MachCommandConditions as conditions
|
||||
from mozbuild.base import MozbuildObject
|
||||
from mozbuild.util import MOZBUILD_METRICS_PATH
|
||||
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
|
|
|
@ -8,11 +8,11 @@ import textwrap
|
|||
import unittest
|
||||
|
||||
from buildconfig import topsrcdir
|
||||
from common import ConfigureTestSandbox, ensure_exe_extension, fake_short_path
|
||||
from mozpack import path as mozpath
|
||||
from mozunit import MockedOpen, main
|
||||
from six import StringIO
|
||||
|
||||
from common import ConfigureTestSandbox, ensure_exe_extension, fake_short_path
|
||||
from mozbuild.configure import ConfigureError, ConfigureSandbox
|
||||
from mozbuild.shellutil import quote as shell_quote
|
||||
from mozbuild.util import exec_
|
||||
|
|
|
@ -8,11 +8,11 @@ import unittest
|
|||
|
||||
import mozpack.path as mozpath
|
||||
from buildconfig import topsrcdir
|
||||
from common import ConfigureTestSandbox
|
||||
from mozunit import main
|
||||
from six import StringIO
|
||||
from test_toolchain_helpers import FakeCompiler
|
||||
|
||||
from common import ConfigureTestSandbox
|
||||
from mozbuild.util import exec_
|
||||
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
# 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/.
|
||||
|
||||
from common import BaseConfigureTest, ConfigureTestSandbox
|
||||
from mozunit import main
|
||||
|
||||
from common import BaseConfigureTest, ConfigureTestSandbox
|
||||
from mozbuild.util import ReadOnlyNamespace, exec_, memoized_property
|
||||
|
||||
|
||||
|
|
|
@ -6,13 +6,13 @@ import logging
|
|||
import os
|
||||
|
||||
import six
|
||||
from common import BaseConfigureTest
|
||||
from mozboot.util import MINIMUM_RUST_VERSION
|
||||
from mozpack import path as mozpath
|
||||
from mozunit import main
|
||||
from six import StringIO
|
||||
from test_toolchain_helpers import CompilerResult, FakeCompiler, PrependFlags
|
||||
|
||||
from common import BaseConfigureTest
|
||||
from mozbuild.configure.util import Version
|
||||
from mozbuild.util import ReadOnlyNamespace, memoize
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
import os
|
||||
|
||||
from buildconfig import topsrcdir
|
||||
from common import BaseConfigureTest
|
||||
from mozpack import path as mozpath
|
||||
from mozunit import MockedOpen, main
|
||||
|
||||
from common import BaseConfigureTest
|
||||
from mozbuild.configure.options import InvalidOptionError
|
||||
|
||||
|
||||
|
|
|
@ -11,11 +11,11 @@ import unittest
|
|||
|
||||
import six
|
||||
from buildconfig import topsrcdir
|
||||
from common import ConfigureTestSandbox
|
||||
from mozpack import path as mozpath
|
||||
from mozunit import main
|
||||
from six import StringIO
|
||||
|
||||
from common import ConfigureTestSandbox
|
||||
from mozbuild.configure import ConfigureSandbox
|
||||
from mozbuild.configure.util import (
|
||||
ConfigureOutputHandler,
|
||||
|
|
|
@ -430,7 +430,7 @@ class List(list):
|
|||
raise ValueError("List can only be created from other list instances.")
|
||||
|
||||
self._kwargs = kwargs
|
||||
super(List, self).__init__(iterable)
|
||||
return super(List, self).__init__(iterable)
|
||||
|
||||
def extend(self, l):
|
||||
if not isinstance(l, list):
|
||||
|
|
|
@ -6,9 +6,8 @@ import re
|
|||
from collections import OrderedDict
|
||||
|
||||
import six
|
||||
from packaging.version import Version
|
||||
|
||||
from mozpack.errors import errors
|
||||
from packaging.version import Version
|
||||
|
||||
|
||||
class Flag(object):
|
||||
|
|
|
@ -5,12 +5,11 @@
|
|||
import os
|
||||
import re
|
||||
|
||||
import six
|
||||
from six.moves.urllib.parse import urlparse
|
||||
|
||||
import mozpack.path as mozpath
|
||||
import six
|
||||
from mozpack.chrome.flags import Flags
|
||||
from mozpack.errors import errors
|
||||
from six.moves.urllib.parse import urlparse
|
||||
|
||||
|
||||
class ManifestEntry(object):
|
||||
|
|
|
@ -9,9 +9,8 @@ import stat
|
|||
import sys
|
||||
from collections import Counter, OrderedDict, defaultdict
|
||||
|
||||
import six
|
||||
|
||||
import mozpack.path as mozpath
|
||||
import six
|
||||
from mozpack.errors import errors
|
||||
from mozpack.files import BaseFile, Dest
|
||||
|
||||
|
|
|
@ -18,18 +18,18 @@ from itertools import chain, takewhile
|
|||
from tarfile import TarFile, TarInfo
|
||||
from tempfile import NamedTemporaryFile, mkstemp
|
||||
|
||||
import mozpack.path as mozpath
|
||||
import six
|
||||
from jsmin import JavascriptMinify
|
||||
|
||||
import mozbuild.makeutil as makeutil
|
||||
import mozpack.path as mozpath
|
||||
from mozbuild.preprocessor import Preprocessor
|
||||
from mozbuild.util import FileAvoidWrite, ensure_unicode, memoize
|
||||
from mozpack.chrome.manifest import ManifestEntry, ManifestInterfaces
|
||||
from mozpack.errors import ErrorMessage, errors
|
||||
from mozpack.executables import elfhack, is_executable, may_elfhack, may_strip, strip
|
||||
from mozpack.mozjar import JarReader
|
||||
|
||||
import mozbuild.makeutil as makeutil
|
||||
from mozbuild.preprocessor import Preprocessor
|
||||
from mozbuild.util import FileAvoidWrite, ensure_unicode, memoize
|
||||
|
||||
try:
|
||||
import hglib
|
||||
except ImportError:
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
import json
|
||||
from contextlib import contextmanager
|
||||
|
||||
import six
|
||||
|
||||
import mozpack.path as mozpath
|
||||
import six
|
||||
|
||||
from .files import (
|
||||
AbsoluteSymlinkFile,
|
||||
|
|
|
@ -9,9 +9,9 @@ from collections import OrderedDict
|
|||
from io import BytesIO, UnsupportedOperation
|
||||
from zipfile import ZIP_DEFLATED, ZIP_STORED
|
||||
|
||||
import mozpack.path as mozpath
|
||||
import six
|
||||
|
||||
import mozpack.path as mozpath
|
||||
from mozbuild.util import ensure_bytes
|
||||
|
||||
JAR_STORED = ZIP_STORED
|
||||
|
|
|
@ -8,10 +8,8 @@ import os
|
|||
import re
|
||||
from collections import deque
|
||||
|
||||
import six
|
||||
|
||||
import mozpack.path as mozpath
|
||||
from mozbuild.preprocessor import Preprocessor
|
||||
import six
|
||||
from mozpack.chrome.manifest import (
|
||||
Manifest,
|
||||
ManifestBinaryComponent,
|
||||
|
@ -22,6 +20,8 @@ from mozpack.chrome.manifest import (
|
|||
)
|
||||
from mozpack.errors import errors
|
||||
|
||||
from mozbuild.preprocessor import Preprocessor
|
||||
|
||||
|
||||
class Component(object):
|
||||
"""
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
# 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/.
|
||||
|
||||
from six.moves.urllib.parse import urlparse
|
||||
|
||||
import mozpack.path as mozpath
|
||||
from mozpack.chrome.manifest import (
|
||||
Manifest,
|
||||
|
@ -16,6 +14,7 @@ from mozpack.chrome.manifest import (
|
|||
from mozpack.copier import FileRegistry, FileRegistrySubtree, Jarrer
|
||||
from mozpack.errors import errors
|
||||
from mozpack.files import ManifestFile
|
||||
from six.moves.urllib.parse import urlparse
|
||||
|
||||
"""
|
||||
Formatters are classes receiving packaging instructions and creating the
|
||||
|
|
|
@ -10,10 +10,9 @@ directory.
|
|||
import json
|
||||
import os
|
||||
|
||||
import mozpack.path as mozpath
|
||||
import six
|
||||
from createprecomplete import generate_precomplete
|
||||
|
||||
import mozpack.path as mozpath
|
||||
from mozpack.chrome.manifest import (
|
||||
Manifest,
|
||||
ManifestChrome,
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
|
||||
import codecs
|
||||
|
||||
from six.moves.urllib.parse import urlparse
|
||||
|
||||
import mozpack.path as mozpath
|
||||
from mozpack.chrome.manifest import (
|
||||
ManifestEntryWithRelPath,
|
||||
|
@ -18,6 +16,7 @@ from mozpack.files import BaseFinder, DeflatedFile, FileFinder, ManifestFile
|
|||
from mozpack.mozjar import JarReader
|
||||
from mozpack.packager import SimplePackager
|
||||
from mozpack.packager.formats import FlatFormatter
|
||||
from six.moves.urllib.parse import urlparse
|
||||
|
||||
|
||||
class UnpackFinder(BaseFinder):
|
||||
|
|
|
@ -11,8 +11,6 @@ import tempfile
|
|||
import unittest
|
||||
|
||||
import pytest
|
||||
from mozunit import main
|
||||
|
||||
from mozpack.archive import (
|
||||
DEFAULT_MTIME,
|
||||
create_tar_bz2_from_files,
|
||||
|
@ -20,6 +18,7 @@ from mozpack.archive import (
|
|||
create_tar_gz_from_files,
|
||||
)
|
||||
from mozpack.files import GeneratedFile
|
||||
from mozunit import main
|
||||
|
||||
MODE_STANDARD = stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
import unittest
|
||||
|
||||
import mozunit
|
||||
|
||||
from mozpack.chrome.flags import Flag, Flags, StringFlag, VersionFlag
|
||||
from mozpack.errors import ErrorMessage
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ import os
|
|||
import unittest
|
||||
|
||||
import mozunit
|
||||
|
||||
from mozpack.chrome.manifest import (
|
||||
MANIFESTS_TYPES,
|
||||
Manifest,
|
||||
|
|
|
@ -6,10 +6,9 @@ import os
|
|||
import stat
|
||||
import unittest
|
||||
|
||||
import mozpack.path as mozpath
|
||||
import mozunit
|
||||
import six
|
||||
|
||||
import mozpack.path as mozpath
|
||||
from mozpack.copier import FileCopier, FileRegistry, FileRegistrySubtree, Jarrer
|
||||
from mozpack.errors import ErrorMessage
|
||||
from mozpack.files import ExistingFile, GeneratedFile
|
||||
|
|
|
@ -7,7 +7,6 @@ import unittest
|
|||
|
||||
import mozunit
|
||||
import six
|
||||
|
||||
from mozpack.errors import AccumulatedErrors, ErrorMessage, errors
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
# 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/.
|
||||
|
||||
from mozbuild.util import ensure_bytes, ensureParentDir
|
||||
from mozpack.errors import ErrorMessage, errors
|
||||
from mozpack.files import (
|
||||
AbsoluteSymlinkFile,
|
||||
|
@ -25,6 +24,8 @@ from mozpack.files import (
|
|||
TarFinder,
|
||||
)
|
||||
|
||||
from mozbuild.util import ensure_bytes, ensureParentDir
|
||||
|
||||
# We don't have hglib installed everywhere.
|
||||
try:
|
||||
import hglib
|
||||
|
@ -41,10 +42,9 @@ from io import BytesIO
|
|||
from tempfile import mkdtemp
|
||||
|
||||
import mozfile
|
||||
import mozpack.path as mozpath
|
||||
import mozunit
|
||||
import six
|
||||
|
||||
import mozpack.path as mozpath
|
||||
from mozpack.chrome.manifest import (
|
||||
ManifestContent,
|
||||
ManifestLocale,
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
import os
|
||||
|
||||
import mozunit
|
||||
|
||||
from mozpack.copier import FileCopier, FileRegistry
|
||||
from mozpack.manifests import InstallManifest, UnreadableInstallManifest
|
||||
from mozpack.test.test_files import TestWithTmpDir
|
||||
|
|
|
@ -6,10 +6,9 @@ import os
|
|||
import unittest
|
||||
from collections import OrderedDict
|
||||
|
||||
import mozpack.path as mozpath
|
||||
import mozunit
|
||||
import six
|
||||
|
||||
import mozpack.path as mozpath
|
||||
from mozpack.files import FileFinder
|
||||
from mozpack.mozjar import (
|
||||
Deflater,
|
||||
|
|
|
@ -5,12 +5,9 @@
|
|||
import os
|
||||
import unittest
|
||||
|
||||
import mozpack.path as mozpath
|
||||
import mozunit
|
||||
from buildconfig import topobjdir
|
||||
from mozunit import MockedOpen
|
||||
|
||||
import mozpack.path as mozpath
|
||||
from mozbuild.preprocessor import Preprocessor
|
||||
from mozpack.chrome.manifest import (
|
||||
ManifestBinaryComponent,
|
||||
ManifestContent,
|
||||
|
@ -25,6 +22,9 @@ from mozpack.packager import (
|
|||
SimplePackager,
|
||||
preprocess_manifest,
|
||||
)
|
||||
from mozunit import MockedOpen
|
||||
|
||||
from mozbuild.preprocessor import Preprocessor
|
||||
|
||||
MANIFEST = """
|
||||
bar/*
|
||||
|
|
|
@ -5,10 +5,9 @@
|
|||
import unittest
|
||||
from itertools import chain
|
||||
|
||||
import mozpack.path as mozpath
|
||||
import mozunit
|
||||
import six
|
||||
|
||||
import mozpack.path as mozpath
|
||||
from mozpack.chrome.manifest import (
|
||||
ManifestBinaryComponent,
|
||||
ManifestComponent,
|
||||
|
|
|
@ -6,7 +6,6 @@ import unittest
|
|||
|
||||
import mozunit
|
||||
import six
|
||||
|
||||
from mozpack.chrome.manifest import Manifest, ManifestContent, ManifestLocale
|
||||
from mozpack.copier import FileRegistry
|
||||
from mozpack.files import GeneratedFile, ManifestFile
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import mozunit
|
||||
|
||||
from mozpack.copier import FileCopier, FileRegistry
|
||||
from mozpack.packager.formats import FlatFormatter, JarFormatter, OmniJarFormatter
|
||||
from mozpack.packager.unpack import unpack_to_registry
|
||||
|
|
|
@ -6,7 +6,6 @@ import os
|
|||
import unittest
|
||||
|
||||
import mozunit
|
||||
|
||||
from mozpack.path import (
|
||||
basedir,
|
||||
basename,
|
||||
|
|
|
@ -6,9 +6,8 @@ from pathlib import Path
|
|||
from string import Template
|
||||
from unittest.mock import patch
|
||||
|
||||
import mozunit
|
||||
|
||||
import mozpack.pkg
|
||||
import mozunit
|
||||
from mozpack.pkg import (
|
||||
create_bom,
|
||||
create_payload,
|
||||
|
|
|
@ -7,14 +7,14 @@ import sys
|
|||
from io import StringIO
|
||||
|
||||
import mozunit
|
||||
|
||||
from mozbuild.util import ensureParentDir
|
||||
from mozpack.errors import AccumulatedErrors, ErrorMessage, errors
|
||||
from mozpack.files import FileFinder
|
||||
from mozpack.mozjar import JarWriter
|
||||
from mozpack.test.test_files import MockDest, TestWithTmpDir
|
||||
from mozpack.unify import UnifiedBuildFinder, UnifiedFinder
|
||||
|
||||
from mozbuild.util import ensureParentDir
|
||||
|
||||
|
||||
class TestUnified(TestWithTmpDir):
|
||||
def create_one(self, which, path, content):
|
||||
|
|
|
@ -10,13 +10,13 @@ from collections import OrderedDict
|
|||
from tempfile import mkstemp
|
||||
|
||||
import buildconfig
|
||||
|
||||
import mozpack.path as mozpath
|
||||
from mozbuild.util import hexdump
|
||||
from mozpack.errors import errors
|
||||
from mozpack.executables import MACHO_SIGNATURES
|
||||
from mozpack.files import BaseFile, BaseFinder, ExecutableFile, GeneratedFile
|
||||
|
||||
from mozbuild.util import hexdump
|
||||
|
||||
# Regular expressions for unifying install.rdf
|
||||
FIND_TARGET_PLATFORM = re.compile(
|
||||
r"""
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[settings]
|
||||
profile=black
|
||||
known_first_party=mozlint
|
|
@ -1,4 +0,0 @@
|
|||
extend = "../../pyproject.toml"
|
||||
|
||||
[isort]
|
||||
known-first-party = ["mozlint"]
|
|
@ -0,0 +1,3 @@
|
|||
[settings]
|
||||
profile=black
|
||||
known_first_party=mozperftest
|
|
@ -1,4 +0,0 @@
|
|||
extend = "../../pyproject.toml"
|
||||
|
||||
[isort]
|
||||
known-first-party = ["mozperftest"]
|
|
@ -0,0 +1,3 @@
|
|||
[settings]
|
||||
profile=black
|
||||
known_first_party=mozrelease
|
|
@ -1,4 +0,0 @@
|
|||
extend = "../../pyproject.toml"
|
||||
|
||||
[isort]
|
||||
known-first-party = ["mozrelease"]
|
|
@ -10,6 +10,7 @@ from operator import itemgetter
|
|||
|
||||
import requests
|
||||
from mozilla_version.gecko import GeckoVersion
|
||||
|
||||
from taskcluster import Notify, optionsFromEnvironment
|
||||
|
||||
BUGLIST_TEMPLATE = "* [Bugs since previous changeset]({url})\n"
|
||||
|
|
|
@ -12,11 +12,12 @@ import tempfile
|
|||
from contextlib import contextmanager
|
||||
from pathlib import Path
|
||||
|
||||
import taskcluster
|
||||
from appdirs import user_config_dir
|
||||
from gecko_taskgraph import GECKO
|
||||
from mach.base import FailedCommandError
|
||||
|
||||
import taskcluster
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[settings]
|
||||
profile=black
|
||||
known_first_party=mozterm
|
|
@ -1,4 +0,0 @@
|
|||
extend = "../../pyproject.toml"
|
||||
|
||||
[isort]
|
||||
known-first-party = ["mozterm"]
|
|
@ -0,0 +1,3 @@
|
|||
[settings]
|
||||
profile=black
|
||||
known_first_party=mozversioncontrol
|
|
@ -1,4 +0,0 @@
|
|||
extend = "../../pyproject.toml"
|
||||
|
||||
[isort]
|
||||
known-first-party = ["mozversioncontrol"]
|
|
@ -242,6 +242,20 @@ mscom-init:
|
|||
- '**/*.h'
|
||||
- 'tools/lint/mscom-init.yml'
|
||||
|
||||
py-flake8:
|
||||
description: flake8 run over the gecko codebase
|
||||
treeherder:
|
||||
symbol: py(f8)
|
||||
run:
|
||||
mach: lint -v -l flake8 -f treeherder -f json:/builds/worker/mozlint.json *
|
||||
when:
|
||||
files-changed:
|
||||
- '**/*.py'
|
||||
- '**/.flake8'
|
||||
- 'tools/lint/flake8.yml'
|
||||
# moz.configure files are also Python files.
|
||||
- '**/*.configure'
|
||||
|
||||
py-black:
|
||||
description: black run over the gecko codebase
|
||||
treeherder:
|
||||
|
@ -258,21 +272,33 @@ py-black:
|
|||
- 'pyproject.toml'
|
||||
- 'tools/lint/black.yml'
|
||||
|
||||
py-ruff:
|
||||
description: Run ruff over the gecko codebase
|
||||
py-pylint:
|
||||
description: pylint run over the gecko codebase
|
||||
treeherder:
|
||||
symbol: py(ruff)
|
||||
symbol: py(pylint)
|
||||
run:
|
||||
mach: lint -v -l ruff -f treeherder -f json:/builds/worker/mozlint.json *
|
||||
mach: lint -v -l pylint -f treeherder -f json:/builds/worker/mozlint.json *
|
||||
when:
|
||||
files-changed:
|
||||
- '**/*.py'
|
||||
- 'tools/lint/pylint.yml'
|
||||
# moz.configure files are also Python files
|
||||
# However, pylint has some hard time dealing with it
|
||||
|
||||
py-isort:
|
||||
description: isort run over the gecko codebase
|
||||
treeherder:
|
||||
symbol: py(isort)
|
||||
run:
|
||||
mach: lint -v -l isort -f treeherder -f json:/builds/worker/mozlint.json *
|
||||
when:
|
||||
files-changed:
|
||||
- '**/*.py'
|
||||
- '**/.flake8'
|
||||
- '**/.isort.cfg'
|
||||
- 'tools/lint/isort.yml'
|
||||
# moz.configure files are also Python files.
|
||||
- '**/*.configure'
|
||||
- '**/.ruff.toml'
|
||||
- 'pyproject.toml'
|
||||
- 'tools/lint/ruff.yml'
|
||||
- 'tools/lint/python/ruff.py'
|
||||
- 'tools/lint/python/ruff_requirements.txt'
|
||||
|
||||
test-manifest:
|
||||
description: lint test manifests
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[settings]
|
||||
profile=black
|
||||
known_first_party=gecko_taskgraph
|
|
@ -1,4 +0,0 @@
|
|||
extend = "../../pyproject.toml"
|
||||
|
||||
[isort]
|
||||
known-first-party = ["gecko_taskgraph"]
|
|
@ -50,8 +50,8 @@ def register(graph_config):
|
|||
"""
|
||||
from taskgraph import generator
|
||||
|
||||
from gecko_taskgraph import morph # noqa: trigger morph registration
|
||||
from gecko_taskgraph import ( # noqa: trigger target task method registration
|
||||
morph, # noqa: trigger morph registration
|
||||
target_tasks,
|
||||
)
|
||||
from gecko_taskgraph.parameters import register_parameters
|
||||
|
|
|
@ -17,7 +17,6 @@ import time
|
|||
|
||||
import attr
|
||||
from mozbuild.util import memoize
|
||||
from taskcluster.utils import fromNow
|
||||
from taskgraph.transforms.base import TransformSequence
|
||||
from taskgraph.util.keyed_by import evaluate_keyed_by
|
||||
from taskgraph.util.schema import (
|
||||
|
@ -41,6 +40,7 @@ from gecko_taskgraph.util.partners import get_partners_to_be_published
|
|||
from gecko_taskgraph.util.scriptworker import BALROG_ACTIONS, get_release_config
|
||||
from gecko_taskgraph.util.signed_artifacts import get_signed_artifacts
|
||||
from gecko_taskgraph.util.workertypes import get_worker_type, worker_type_implementation
|
||||
from taskcluster.utils import fromNow
|
||||
|
||||
RUN_TASK = os.path.join(GECKO, "taskcluster", "scripts", "run-task")
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ import logging
|
|||
import os
|
||||
|
||||
import taskcluster_urls as liburls
|
||||
from taskcluster import Hooks
|
||||
from taskgraph.util import taskcluster as tc_util
|
||||
from taskgraph.util.taskcluster import (
|
||||
_do_request,
|
||||
|
@ -17,6 +16,8 @@ from taskgraph.util.taskcluster import (
|
|||
get_task_url,
|
||||
)
|
||||
|
||||
from taskcluster import Hooks
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -12,8 +12,6 @@ import tarfile
|
|||
import tempfile
|
||||
import time
|
||||
|
||||
from mozprofile.prefs import Preferences
|
||||
|
||||
from condprof import progress
|
||||
from condprof.changelog import Changelog
|
||||
from condprof.util import (
|
||||
|
@ -23,6 +21,7 @@ from condprof.util import (
|
|||
download_file,
|
||||
logger,
|
||||
)
|
||||
from mozprofile.prefs import Preferences
|
||||
|
||||
TC_SERVICE = "https://firefox-ci-tc.services.mozilla.com"
|
||||
ROOT_URL = TC_SERVICE + "/api/index"
|
||||
|
|
|
@ -7,7 +7,6 @@ import os
|
|||
import random
|
||||
|
||||
from arsenic.errors import UnknownArsenicError, UnknownError
|
||||
|
||||
from condprof.helpers import TabSwitcher, execute_async_script, is_mobile
|
||||
from condprof.util import get_credentials, logger
|
||||
|
||||
|
|
|
@ -7,10 +7,9 @@ import tempfile
|
|||
import unittest
|
||||
|
||||
import responses
|
||||
from mozprofile.prefs import Preferences
|
||||
|
||||
from condprof.client import ROOT_URL, TC_SERVICE, get_profile
|
||||
from condprof.util import _DEFAULT_SERVER
|
||||
from mozprofile.prefs import Preferences
|
||||
|
||||
PROFILE = re.compile(ROOT_URL + "/.*/.*tgz")
|
||||
PROFILE_FOR_TESTS = os.path.join(os.path.dirname(__file__), "profile")
|
||||
|
|
|
@ -7,7 +7,6 @@ import tempfile
|
|||
import unittest
|
||||
|
||||
import responses
|
||||
|
||||
from condprof import client
|
||||
from condprof.client import ROOT_URL, TC_SERVICE
|
||||
from condprof.main import main
|
||||
|
|
|
@ -16,11 +16,10 @@ from subprocess import PIPE, Popen
|
|||
import mozlog
|
||||
import requests
|
||||
import yaml
|
||||
from condprof import progress
|
||||
from requests.exceptions import ConnectionError
|
||||
from requests.packages.urllib3.util.retry import Retry
|
||||
|
||||
from condprof import progress
|
||||
|
||||
TASK_CLUSTER = "TASK_ID" in os.environ.keys()
|
||||
DOWNLOAD_TIMEOUT = 30
|
||||
|
||||
|
|
|
@ -4,10 +4,9 @@
|
|||
# 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/.
|
||||
|
||||
from marionette_harness.runtests import cli as mn_cli
|
||||
|
||||
from firefox_ui_harness.arguments import FirefoxUIArguments
|
||||
from firefox_ui_harness.runners import FirefoxUITestRunner
|
||||
from marionette_harness.runtests import cli as mn_cli
|
||||
|
||||
|
||||
def cli(args=None):
|
||||
|
|
|
@ -538,7 +538,7 @@ def run_desktop_test(
|
|||
|
||||
|
||||
def run_android_test(command_context, tests, symbols_path, manifest_path, log):
|
||||
import remotecppunittests
|
||||
import remotecppunittests as remotecppunittests
|
||||
from mozlog import commandline
|
||||
|
||||
parser = remotecppunittests.RemoteCPPUnittestOptions()
|
||||
|
|
|
@ -16,8 +16,9 @@ import sys
|
|||
import time
|
||||
|
||||
from six.moves.urllib import parse as urlparse
|
||||
from wptserve import handlers, request, server
|
||||
from wptserve import handlers, request
|
||||
from wptserve import routes as default_routes
|
||||
from wptserve import server
|
||||
|
||||
root = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||
default_doc_root = os.path.join(root, "www")
|
||||
|
|
|
@ -6,7 +6,6 @@ import sys
|
|||
|
||||
import mozlog
|
||||
from marionette_driver import __version__ as driver_version
|
||||
|
||||
from marionette_harness import (
|
||||
BaseMarionetteArguments,
|
||||
BaseMarionetteTestRunner,
|
||||
|
|
|
@ -13,8 +13,9 @@ import types
|
|||
|
||||
from six import StringIO, string_types
|
||||
|
||||
from .filters import DEFAULT_FILTERS, enabled, filterlist
|
||||
from .filters import DEFAULT_FILTERS, enabled
|
||||
from .filters import exists as _exists
|
||||
from .filters import filterlist
|
||||
from .ini import read_ini
|
||||
|
||||
__all__ = ["ManifestParser", "TestManifest", "convert"]
|
||||
|
|
|
@ -8,7 +8,6 @@ import subprocess
|
|||
import sys
|
||||
|
||||
import six
|
||||
|
||||
from mozlog.formatters import base
|
||||
|
||||
DEFAULT_MOVE_UP_CODE = u"\x1b[A"
|
||||
|
|
|
@ -8,7 +8,6 @@ import locale
|
|||
from threading import Lock
|
||||
|
||||
import six
|
||||
|
||||
from mozlog.handlers.messagehandler import MessageHandler
|
||||
from mozlog.structuredlog import log_levels
|
||||
|
||||
|
|
|
@ -4,11 +4,10 @@
|
|||
|
||||
import time
|
||||
|
||||
import mozlog
|
||||
import pytest
|
||||
import six
|
||||
|
||||
import mozlog
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
# We can't simply use mozlog.commandline.add_logging_group(parser) here because
|
||||
|
|
|
@ -7,7 +7,6 @@ import json
|
|||
from collections import defaultdict
|
||||
|
||||
import six
|
||||
|
||||
from mozlog import reader
|
||||
|
||||
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче