mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Make code.InteractiveInterpreter#locals a dict not a mapping (#13775)
This commit is contained in:
+7
-7
@@ -1,15 +1,15 @@
|
||||
import sys
|
||||
from codeop import CommandCompiler
|
||||
from collections.abc import Callable, Mapping
|
||||
from collections.abc import Callable
|
||||
from types import CodeType
|
||||
from typing import Any
|
||||
|
||||
__all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact", "compile_command"]
|
||||
|
||||
class InteractiveInterpreter:
|
||||
locals: Mapping[str, Any] # undocumented
|
||||
locals: dict[str, Any] # undocumented
|
||||
compile: CommandCompiler # undocumented
|
||||
def __init__(self, locals: Mapping[str, Any] | None = None) -> None: ...
|
||||
def __init__(self, locals: dict[str, Any] | None = None) -> None: ...
|
||||
def runsource(self, source: str, filename: str = "<input>", symbol: str = "single") -> bool: ...
|
||||
def runcode(self, code: CodeType) -> None: ...
|
||||
if sys.version_info >= (3, 13):
|
||||
@@ -25,11 +25,11 @@ class InteractiveConsole(InteractiveInterpreter):
|
||||
filename: str # undocumented
|
||||
if sys.version_info >= (3, 13):
|
||||
def __init__(
|
||||
self, locals: Mapping[str, Any] | None = None, filename: str = "<console>", *, local_exit: bool = False
|
||||
self, locals: dict[str, Any] | None = None, filename: str = "<console>", *, local_exit: bool = False
|
||||
) -> None: ...
|
||||
def push(self, line: str, filename: str | None = None) -> bool: ...
|
||||
else:
|
||||
def __init__(self, locals: Mapping[str, Any] | None = None, filename: str = "<console>") -> None: ...
|
||||
def __init__(self, locals: dict[str, Any] | None = None, filename: str = "<console>") -> None: ...
|
||||
def push(self, line: str) -> bool: ...
|
||||
|
||||
def interact(self, banner: str | None = None, exitmsg: str | None = None) -> None: ...
|
||||
@@ -40,7 +40,7 @@ if sys.version_info >= (3, 13):
|
||||
def interact(
|
||||
banner: str | None = None,
|
||||
readfunc: Callable[[str], str] | None = None,
|
||||
local: Mapping[str, Any] | None = None,
|
||||
local: dict[str, Any] | None = None,
|
||||
exitmsg: str | None = None,
|
||||
local_exit: bool = False,
|
||||
) -> None: ...
|
||||
@@ -49,7 +49,7 @@ else:
|
||||
def interact(
|
||||
banner: str | None = None,
|
||||
readfunc: Callable[[str], str] | None = None,
|
||||
local: Mapping[str, Any] | None = None,
|
||||
local: dict[str, Any] | None = None,
|
||||
exitmsg: str | None = None,
|
||||
) -> None: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user