Typecheck typeshed's code with pyright (#9793)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Avasam
2023-02-22 13:53:07 -05:00
committed by GitHub
parent b0dc6a3405
commit 75f47d0cb1
12 changed files with 125 additions and 32 deletions

View File

@@ -7,8 +7,8 @@ import os
import re
import subprocess
import sys
from collections.abc import Iterable
from pathlib import Path
from typing import Iterable
try:
from termcolor import colored
@@ -176,7 +176,7 @@ def main() -> None:
print("stubtest:", _SKIPPED)
else:
print("stubtest:", _SUCCESS if stubtest_result.returncode == 0 else _FAILED)
if pytype_result is None:
if not pytype_result:
print("pytype:", _SKIPPED)
else:
print("pytype:", _SUCCESS if pytype_result.returncode == 0 else _FAILED)