Bug 1837502 [wpt PR 40459] - Update wpt metadata, a=testonly
[gecko.git] / pyproject.toml
blobac8fd677eb563029efb8ad0d55249ffdb2862a82
1 [tool.ruff]
2 line-length = 99
3 # See https://beta.ruff.rs/docs/rules/ for a full list of rules.
4 select = [
5   "E", "W",    # pycodestyle
6   "F",         # pyflakes
7   "I",         # isort
8   "PL",        # pylint
10 ignore = [
11   # These should be triaged and either fixed or moved to the list below.
12   "E713", "E714", "W605",
14   # These are intentionally ignored.
15   "E741",      # ambiguous-variable-name
16   "PLR09",     # too-many-return-statements, too-many-branches, too-many-arguments, too-many-statements
17   "PLR2004",   # magic-value-comparison
19   # These are handled by black.
20   "E1", "E4", "E5", "W2", "W5"
22 builtins = ["gdb"]
23 exclude = [
24   # These paths should be triaged and either fixed or moved to the list below.
25   "devtools/shared",
26   "dom/bindings/Codegen.py",
27   "dom/bindings/parser/WebIDL.py",
28   "dom/bindings/parser/tests/test_arraybuffer.py",
29   "dom/bindings/parser/tests/test_securecontext_extended_attribute.py",
30   "gfx/tests",
31   "ipc/ipdl/ipdl",
32   "layout/base/tests/marionette",
33   "layout/reftests/border-image",
34   "layout/reftests/fonts",
35   "layout/reftests/w3c-css",
36   "layout/style",
37   "media/libdav1d/generate_source.py",
38   "moz.configure",
39   "netwerk/dns/prepare_tlds.py",
40   "netwerk/protocol/http/make_incoming_tables.py",
41   "python/l10n/fluent_migrations",
42   "security/manager/ssl/tests/unit",
43   "servo/components/style",
44   "testing/condprofile/condprof/android.py",
45   "testing/condprofile/condprof/creator.py",
46   "testing/condprofile/condprof/desktop.py",
47   "testing/condprofile/condprof/runner.py",
48   "testing/condprofile/condprof/scenarii/heavy.py",
49   "testing/condprofile/condprof/scenarii/settled.py",
50   "testing/condprofile/condprof/scenarii/synced.p",
51   "testing/condprofile/condprof/helpers.py",
52   "testing/jsshell/benchmark.py",
53   "testing/marionette/mach_commands.py",
54   "testing/mozharness/docs",
55   "testing/mozharness/examples",
56   "testing/mozharness/external_tools",
57   "testing/mozharness/mach_commands.py",
58   "testing/mozharness/manifestparser",
59   "testing/mozharness/mozprocess",
60   "testing/mozharness/setup.py",
61   "testing/parse_build_tests_ccov.py",
62   "testing/runtimes/writeruntimes.py",
63   "testing/tools/iceserver/iceserver.py",
64   "testing/tools/websocketprocessbridge/websocketprocessbridge.py",
65   "toolkit/components/featuregates",
66   "toolkit/content/tests/chrome/file_about_networking_wsh.py",
67   "toolkit/library/build/dependentlibs.py",
68   "toolkit/locales/generate_update_locale.py",
69   "toolkit/mozapps",
70   "toolkit/moz.configure",
71   "toolkit/nss.configure",
73   # mako files are not really python files
74   "*.mako.py",
76   # These paths are intentionally excluded (not necessarily for good reason).
77   "build/moz.configure/*.configure",
78   "build/pymake/",
79   "browser/extensions/mortar/ppapi/",
80   "browser/moz.configure",
81   "dom/canvas/test/webgl-conf/checkout/closure-library/",
82   "editor/libeditor/tests/browserscope/",
83   "intl/icu/",
84   "ipc/chromium/src/third_party/",
85   "js/*.configure",
86   "gfx/angle/",
87   "gfx/harfbuzz",
88   "gfx/skia/",
89   "memory/moz.configure",
90   "mobile/android/*.configure",
91   "node_modules",
92   "python/mozbuild/mozbuild/test/configure/data",
93   "security/nss/",
94   "testing/marionette/harness/marionette_harness/runner/mixins",
95   "testing/marionette/harness/marionette_harness/tests",
96   "testing/mochitest/pywebsocket3",
97   "testing/mozharness/configs/test/test_malformed.py",
98   "testing/web-platform/tests",
99   "tools/lint/test/files",
100   "tools/crashreporter/*.configure",
101   ".ycm_extra_conf.py",
104 [tool.ruff.per-file-ignores]
105 # These paths are intentionally excluded.
106 "dom/bindings/Configuration.py" = ["PLC3002"]
107 "ipc/ipdl/*" = ["F403", "F405"]
108 "layout/tools/reftest/selftest/conftest.py" = ["F811"]
109 # cpp_eclipse has a lot of multi-line embedded XML which exceeds line length
110 "python/mozbuild/mozbuild/backend/cpp_eclipse.py" = ["E501"]
111 "testing/firefox-ui/**/__init__.py" = ["F401"]
112 "testing/marionette/**/__init__.py" = ["F401"]
113 "testing/mochitest/tests/python/conftest.py" = ["F811"]
114 "testing/mozbase/manifestparser/tests/test_filters.py" = ["E731"]
115 "testing/mozbase/mozinfo/mozinfo/mozinfo.py" = ["PLE0605"]
116 "testing/mozbase/mozlog/tests/test_formatters.py" = ["E501"]
117 "testing/mozharness/configs/*" = ["E501"]
118 "**/*.configure" = ["F821"]
119 # These paths contain Python-2 only syntax.
120 "build/compare-mozconfig/compare-mozconfigs.py" = ["F821"]
121 "build/midl.py" = ["F821"]
122 "build/pgo/genpgocert.py" = ["F821"]
123 "config/MozZipFile.py" = ["F821"]
124 "config/check_source_count.py" = ["F821"]
125 "config/tests/unitMozZipFile.py" = ["F821"]
126 "ipc/pull-chromium.py" = ["F633"]
127 "js/src/**" = ["F633", "F821"]
128 "python/mozbuild/mozbuild/action/dump_env.py" = ["F821"]
129 "python/mozbuild/mozbuild/dotproperties.py" = ["F821"]
130 "python/mozbuild/mozbuild/testing.py" = ["F821"]
131 "python/mozbuild/mozbuild/util.py" = ["F821"]
132 "testing/mozharness/mozharness/mozilla/testing/android.py" = ["F821"]
133 "testing/mochitest/runtests.py" = ["F821"]