tests / scripts: blacken and isort (#4704)

I often run black and isort in typeshed root and then have to undo these
changes.

Co-authored-by: hauntsaninja <>
This commit is contained in:
Shantanu
2020-10-25 11:21:03 +01:00
committed by GitHub
co-authored by hauntsaninja <>
parent 2f1367332b
commit 48970d31de
9 changed files with 97 additions and 113 deletions
+3 -5
View File
@@ -2,10 +2,10 @@
# Runs stubtest and prints each unused whitelist entry with filename.
from typing import List, Tuple
import os.path
import subprocess
import sys
from typing import List, Tuple
_UNUSED_NOTE = "note: unused allowlist entry "
_WHITELIST_PATH = os.path.join("tests", "stubtest_whitelists")
@@ -22,11 +22,9 @@ def main() -> int:
def run_stubtest() -> List[str]:
proc = subprocess.run(
["./tests/stubtest_test.py"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT
)
proc = subprocess.run(["./tests/stubtest_test.py"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
output = proc.stdout.decode("utf-8").splitlines()
return [line[len(_UNUSED_NOTE):].strip() for line in output if line.startswith(_UNUSED_NOTE)]
return [line[len(_UNUSED_NOTE) :].strip() for line in output if line.startswith(_UNUSED_NOTE)]
def unused_files(unused: str) -> List[Tuple[str, str]]: