mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +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
@@ -20,30 +20,7 @@ third_party/2and3/attr/converters.pyi
|
||||
third_party/2and3/attr/filters.pyi
|
||||
third_party/2and3/attr/validators.pyi
|
||||
third_party/2and3/boto/utils.pyi
|
||||
third_party/2and3/click/README.md
|
||||
third_party/2and3/click/__init__.pyi
|
||||
third_party/2and3/click/core.pyi
|
||||
third_party/2and3/click/decorators.pyi
|
||||
third_party/2and3/click/exceptions.pyi
|
||||
third_party/2and3/click/formatting.pyi
|
||||
third_party/2and3/click/globals.pyi
|
||||
third_party/2and3/click/parser.pyi
|
||||
third_party/2and3/click/termui.pyi
|
||||
third_party/2and3/click/testing.pyi
|
||||
third_party/2and3/click/types.pyi
|
||||
third_party/2and3/dateutil/rrule.pyi
|
||||
third_party/2and3/flask/__init__.pyi
|
||||
third_party/2and3/flask/app.pyi
|
||||
third_party/2and3/flask/blueprints.pyi
|
||||
third_party/2and3/flask/cli.pyi
|
||||
third_party/2and3/flask/ctx.pyi
|
||||
third_party/2and3/flask/debughelpers.pyi
|
||||
third_party/2and3/flask/globals.pyi
|
||||
third_party/2and3/flask/helpers.pyi
|
||||
third_party/2and3/flask/logging.pyi
|
||||
third_party/2and3/flask/templating.pyi
|
||||
third_party/2and3/flask/testing.pyi
|
||||
third_party/2and3/flask/views.pyi
|
||||
third_party/2and3/google/protobuf/any_pb2.pyi
|
||||
third_party/2and3/google/protobuf/any_test_pb2.pyi
|
||||
third_party/2and3/google/protobuf/api_pb2.pyi
|
||||
|
||||
@@ -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