Bug 1622677 - Make dom/bindings flake8 compliant. r=sylvestre

Differential Revision: https://phabricator.services.mozilla.com/D160280
This commit is contained in:
Edward Thomas 2022-10-31 17:45:33 +00:00
Родитель 479f9ec25e
Коммит cd3bf16625
3 изменённых файлов: 46 добавлений и 12 удалений

Просмотреть файл

@ -4,7 +4,6 @@ exclude =
# These paths should be triaged and either fixed or moved to the list below.
devtools/shared,
dom/bindings,
gfx/tests,
ipc/ipdl/ipdl,
layout/base/tests/marionette,
layout/reftests/border-image,

Просмотреть файл

@ -286,27 +286,60 @@ class Configuration(DescriptorProvider):
curr = self.descriptorsByFile.get(val, [])
continue
elif key == "hasInterfaceObject":
getter = lambda x: x.interface.hasInterfaceObject()
def getter(x):
return x.interface.hasInterfaceObject()
elif key == "hasInterfacePrototypeObject":
getter = lambda x: x.interface.hasInterfacePrototypeObject()
def getter(x):
return x.interface.hasInterfacePrototypeObject()
elif key == "hasInterfaceOrInterfacePrototypeObject":
getter = lambda x: x.hasInterfaceOrInterfacePrototypeObject()
def getter(x):
return x.hasInterfaceOrInterfacePrototypeObject()
elif key == "isCallback":
getter = lambda x: x.interface.isCallback()
def getter(x):
return x.interface.isCallback()
elif key == "isJSImplemented":
getter = lambda x: x.interface.isJSImplemented()
def getter(x):
return x.interface.isJSImplemented()
elif key == "isExposedInAnyWorker":
getter = lambda x: x.interface.isExposedInAnyWorker()
def getter(x):
return x.interface.isExposedInAnyWorker()
elif key == "isExposedInWorkerDebugger":
getter = lambda x: x.interface.isExposedInWorkerDebugger()
def getter(x):
return x.interface.isExposedInWorkerDebugger()
elif key == "isExposedInAnyWorklet":
getter = lambda x: x.interface.isExposedInAnyWorklet()
def getter(x):
return x.interface.isExposedInAnyWorklet()
elif key == "isExposedInWindow":
getter = lambda x: x.interface.isExposedInWindow()
def getter(x):
return x.interface.isExposedInWindow()
elif key == "isExposedInShadowRealms":
getter = lambda x: x.interface.isExposedInShadowRealms()
def getter(x):
return x.interface.isExposedInShadowRealms()
elif key == "isSerializable":
getter = lambda x: x.interface.isSerializable()
def getter(x):
return x.interface.isSerializable()
else:
# Have to watch out: just closing over "key" is not enough,
# since we're about to mutate its value

Просмотреть файл

@ -3,6 +3,8 @@ import itertools
import string
# We'd like to use itertools.chain but it's 2.6 or higher.
def chain(*iterables):
# chain('ABC', 'DEF') --> A B C D E F
for it in iterables: