Skip to content

Commit 54e1817

Browse files
authored
Make code.InteractiveInterpreter#locals a dict not a mapping (#13775)
1 parent c7ab79e commit 54e1817

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

stdlib/code.pyi

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import sys
22
from codeop import CommandCompiler
3-
from collections.abc import Callable, Mapping
3+
from collections.abc import Callable
44
from types import CodeType
55
from typing import Any
66

77
__all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact", "compile_command"]
88

99
class InteractiveInterpreter:
10-
locals: Mapping[str, Any] # undocumented
10+
locals: dict[str, Any] # undocumented
1111
compile: CommandCompiler # undocumented
12-
def __init__(self, locals: Mapping[str, Any] | None = None) -> None: ...
12+
def __init__(self, locals: dict[str, Any] | None = None) -> None: ...
1313
def runsource(self, source: str, filename: str = "<input>", symbol: str = "single") -> bool: ...
1414
def runcode(self, code: CodeType) -> None: ...
1515
if sys.version_info >= (3, 13):
@@ -25,11 +25,11 @@ class InteractiveConsole(InteractiveInterpreter):
2525
filename: str # undocumented
2626
if sys.version_info >= (3, 13):
2727
def __init__(
28-
self, locals: Mapping[str, Any] | None = None, filename: str = "<console>", *, local_exit: bool = False
28+
self, locals: dict[str, Any] | None = None, filename: str = "<console>", *, local_exit: bool = False
2929
) -> None: ...
3030
def push(self, line: str, filename: str | None = None) -> bool: ...
3131
else:
32-
def __init__(self, locals: Mapping[str, Any] | None = None, filename: str = "<console>") -> None: ...
32+
def __init__(self, locals: dict[str, Any] | None = None, filename: str = "<console>") -> None: ...
3333
def push(self, line: str) -> bool: ...
3434

3535
def interact(self, banner: str | None = None, exitmsg: str | None = None) -> None: ...
@@ -40,7 +40,7 @@ if sys.version_info >= (3, 13):
4040
def interact(
4141
banner: str | None = None,
4242
readfunc: Callable[[str], str] | None = None,
43-
local: Mapping[str, Any] | None = None,
43+
local: dict[str, Any] | None = None,
4444
exitmsg: str | None = None,
4545
local_exit: bool = False,
4646
) -> None: ...
@@ -49,7 +49,7 @@ else:
4949
def interact(
5050
banner: str | None = None,
5151
readfunc: Callable[[str], str] | None = None,
52-
local: Mapping[str, Any] | None = None,
52+
local: dict[str, Any] | None = None,
5353
exitmsg: str | None = None,
5454
) -> None: ...
5555

0 commit comments

Comments
 (0)