зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1499822 - [lint] Enable codespell on tools/tryselect, r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D15588 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a46ca1f4ad
Коммит
6ac5500593
|
@ -33,6 +33,7 @@ codespell:
|
|||
- toolkit/components/telemetry/docs/
|
||||
- toolkit/crashreporter/docs/
|
||||
- tools/lint/
|
||||
- tools/tryselect/
|
||||
# List of extensions coming from:
|
||||
# tools/lint/{flake8,eslint}.yml
|
||||
# tools/mach_commands.py (clang-format)
|
||||
|
|
|
@ -158,7 +158,7 @@ class SyntaxParser(BaseTryParser):
|
|||
|
||||
|
||||
class TryArgumentTokenizer(object):
|
||||
symbols = [("seperator", ","),
|
||||
symbols = [("separator", ","),
|
||||
("list_start", "\["),
|
||||
("list_end", "\]"),
|
||||
("item", "([^,\[\]\s][^,\[\]]+)"),
|
||||
|
@ -222,7 +222,7 @@ class TryArgumentParser(object):
|
|||
self.data[value] = []
|
||||
self.current_item = value
|
||||
self.consume()
|
||||
if self.token[0] == "seperator":
|
||||
if self.token[0] == "separator":
|
||||
self.consume()
|
||||
elif self.token[0] == "list_start":
|
||||
self.consume()
|
||||
|
@ -237,7 +237,7 @@ class TryArgumentParser(object):
|
|||
value = self.token[1].strip()
|
||||
self.data[self.current_item].append(value)
|
||||
self.consume()
|
||||
if self.token[0] == "seperator":
|
||||
if self.token[0] == "separator":
|
||||
self.consume()
|
||||
elif self.token[0] == "list_end":
|
||||
self.consume()
|
||||
|
@ -246,7 +246,7 @@ class TryArgumentParser(object):
|
|||
raise ValueError
|
||||
|
||||
def after_list_end_state(self):
|
||||
self.expect("seperator")
|
||||
self.expect("separator")
|
||||
self.consume()
|
||||
self.state = self.item_state
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче