ruff: Fix UP006 Use list instead of List for type annotation.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2024-07-11 17:30:17 -07:00
committed by Tim Abbott
parent c2214b3904
commit e08a24e47f
457 changed files with 3588 additions and 3857 deletions

View File

@@ -4,11 +4,11 @@ import hashlib
import os
import subprocess
import sys
from typing import Iterable, List
from typing import Iterable
def expand_reqs_helper(fpath: str) -> List[str]:
result: List[str] = []
def expand_reqs_helper(fpath: str) -> list[str]:
result: list[str] = []
with open(fpath) as f:
for line in f:
@@ -20,7 +20,7 @@ def expand_reqs_helper(fpath: str) -> List[str]:
return result
def expand_reqs(fpath: str) -> List[str]:
def expand_reqs(fpath: str) -> list[str]:
"""
Returns a sorted list of unique dependencies specified by the requirements file `fpath`.
Removes comments from the output and recursively visits files specified inside `fpath`.