mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Add two more third_party libraries to pytype_test. (#2437)
This commit is contained in:
committed by
Jelle Zijlstra
parent
c96812425a
commit
a08c6eae23
@@ -181,11 +181,16 @@ def pytype_test(args):
|
||||
'--python36-exe)' % args.python36_exe)
|
||||
return 0, 0
|
||||
|
||||
stdlib = 'stdlib/'
|
||||
six = 'third_party/.*/six/'
|
||||
mypy_extensions = 'third_party/.*/mypy_extensions'
|
||||
wanted = re.compile(
|
||||
r'(?:%s).*\.pyi$' % '|'.join([stdlib, six, mypy_extensions]))
|
||||
# TODO(rchen152): Keep expanding our third_party/ coverage so we can move
|
||||
# to a small blacklist rather than an ever-growing whitelist.
|
||||
wanted = [
|
||||
'stdlib/',
|
||||
'third_party/.*/mypy_extensions',
|
||||
'third_party/.*/pkg_resources',
|
||||
'third_party/.*/six/',
|
||||
'third_party/.*/yaml/',
|
||||
]
|
||||
wanted_re = re.compile(r'(?:%s).*\.pyi$' % '|'.join(wanted))
|
||||
skip, parse_only = load_blacklist(dirs)
|
||||
skipped = PathMatcher(skip)
|
||||
parse_only = PathMatcher(parse_only)
|
||||
@@ -214,7 +219,7 @@ def pytype_test(args):
|
||||
for f in sorted(filenames):
|
||||
f = os.path.join(root, f)
|
||||
rel = _get_relative(f)
|
||||
if wanted.search(rel):
|
||||
if wanted_re.search(rel):
|
||||
if parse_only.search(rel):
|
||||
pytd_run.append(f)
|
||||
elif not skipped.search(rel):
|
||||
|
||||
Reference in New Issue
Block a user