Debian Codegraph @

jedi/third_party/typeshed/stdlib/code.pyi

raw symbols SCIP
1 import sys
2 from codeop import CommandCompiler, compile_command as compile_command
3 from collections.abc import Callable
4 from types import CodeType
5 from typing import Any
6
7 __all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact", "compile_command"]
8
9 class InteractiveInterpreter:
10 locals: dict[str, Any] # undocumented
11 compile: CommandCompiler # undocumented
12 def __init__(self, locals: dict[str, Any] | None = None) -> None: ...
13 def runsource(self, source: str, filename: str = "<input>", symbol: str = "single") -> bool: ...
14 def runcode(self, code: CodeType) -> None: ...
15 if sys.version_info >= (3, 13):
16 def showsyntaxerror(self, filename: str | None = None, *, source: str = "") -> None: ...
17 else:
18 def showsyntaxerror(self, filename: str | None = None) -> None: ...
19
20 def showtraceback(self) -> None: ...
21 def write(self, data: str) -> None: ...
22
23 class InteractiveConsole(InteractiveInterpreter):
24 buffer: list[str] # undocumented
25 filename: str # undocumented
26 if sys.version_info >= (3, 13):
27 local_exit: bool # undocumented
28 def __init__(
29 self, locals: dict[str, Any] | None = None, filename: str = "<console>", *, local_exit: bool = False
30 ) -> None: ...
31 def push(self, line: str, filename: str | None = None) -> bool: ...
32 else:
33 def __init__(self, locals: dict[str, Any] | None = None, filename: str = "<console>") -> None: ...
34 def push(self, line: str) -> bool: ...
35
36 def interact(self, banner: str | None = None, exitmsg: str | None = None) -> None: ...
37 def resetbuffer(self) -> None: ...
38 def raw_input(self, prompt: str = "") -> str: ...
39
40 if sys.version_info >= (3, 13):
41 def interact(
42 banner: str | None = None,
43 readfunc: Callable[[str], str] | None = None,
44 local: dict[str, Any] | None = None,
45 exitmsg: str | None = None,
46 local_exit: bool = False,
47 ) -> None: ...
48
49 else:
50 def interact(
51 banner: str | None = None,
52 readfunc: Callable[[str], str] | None = None,
53 local: dict[str, Any] | None = None,
54 exitmsg: str | None = None,
55 ) -> None: ...