mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-19 18:31:14 +08:00
Make pytype happy with the third_party click stubs. (#2966)
This also makes the flask stubs that depend on click parseable. * In pytype_test, only parse files with the .pyi extension. (There's a README in third_party/2and3/click/.) * Annotate with ContextManager rather than using the contextmanager decorator. This is shorter, removes a dependency, and gets rid of the slight weirdness of a decorator needing to be evaluated in a stub. * Fix non-stub things.
This commit is contained in:
committed by
Sebastian Rittau
parent
5dda362b05
commit
4990830c8f
@@ -172,7 +172,7 @@ def pytype_test(args):
|
||||
|
||||
for root, _, filenames in itertools.chain.from_iterable(
|
||||
os.walk(p) for p in paths):
|
||||
for f in sorted(filenames):
|
||||
for f in sorted(f for f in filenames if f.endswith('.pyi')):
|
||||
f = os.path.join(root, f)
|
||||
rel = _get_relative(f)
|
||||
if not skipped.search(rel):
|
||||
|
||||
Reference in New Issue
Block a user