Skip to content

Commit

Permalink
satisfy pyanalyze
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra committed Jan 18, 2023
1 parent 8b56b3d commit 987f98b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions stubdefaulter.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import textwrap
from dataclasses import dataclass
from pathlib import Path
from typing import Any
from typing import Any, Dict, List

import libcst
import typeshed_client
Expand Down Expand Up @@ -109,7 +109,8 @@ def add_defaults_to_stub(
if stub_names is None:
raise ValueError(f"Could not find stub for {module_name}")
stub_lines = path.read_text().splitlines()
replacement_lines: dict[int, list[str]] = {}
# pyanalyze doesn't let you use dict[] here
replacement_lines: Dict[int, List[str]] = {}
for name, info in stub_names.items():
if isinstance(
info.ast, (ast.FunctionDef, ast.AsyncFunctionDef)
Expand Down

0 comments on commit 987f98b

Please sign in to comment.