mirror of https://github.com/tc39/test262.git
Don't require Inflect for linting files (#3839)
This commit is contained in:
parent
e27c9f690c
commit
a8bd958193
|
@ -5,7 +5,6 @@
|
|||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import inflect
|
||||
import os
|
||||
try:
|
||||
from pip._internal import main as pip
|
||||
|
@ -15,8 +14,6 @@ except ImportError:
|
|||
from pip.req import parse_requirements, InstallRequirement
|
||||
import sys
|
||||
|
||||
ie = inflect.engine()
|
||||
|
||||
try:
|
||||
__import__('yaml')
|
||||
except ImportError:
|
||||
|
@ -97,7 +94,7 @@ if __name__ == '__main__':
|
|||
|
||||
files = [path for _path in args.path for path in collect_files(_path)]
|
||||
file_count = len(files)
|
||||
print('Linting %s %s' % (file_count, ie.plural('file', file_count)))
|
||||
print('Linting %s file(s)' % (file_count))
|
||||
|
||||
all_errors = lint(files)
|
||||
unexpected_errors = dict(all_errors)
|
||||
|
@ -109,7 +106,7 @@ if __name__ == '__main__':
|
|||
del unexpected_errors[file_name]
|
||||
|
||||
error_count = len(unexpected_errors)
|
||||
print('Linting complete. %s %s found.' % (error_count, ie.plural('error', error_count)))
|
||||
print('Linting complete. %s error(s) found.' % (error_count))
|
||||
|
||||
if error_count == 0:
|
||||
sys.exit(0)
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
PyYAML==5.1.2
|
||||
inflect==0.2.5
|
||||
|
|
Loading…
Reference in New Issue