mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Annotations for remaining Python 3.8 additions (#3358)
* Add os.add_dll_directory() * Add memfd_create() and flags * Add type annotation to flags * Add stat_result.st_reparse_tag and flags * Add ncurses_version * Add Path.link_to() * Add Picker.reducer_override() * Add plistlib.UID * Add has_dualstack_ipv6() and create_server() * Add shlex.join() * Add SSL methods and fields * Add Python 3.8 statistics functions and classes * Remove obsolete sys.subversion * Add sys.unraisablehook * Add threading.excepthook * Add get_native_id() and Thread.native_id * Add Python 3.8 tkinter methods * Add CLOCK_UPTIME_RAW * Add SupportsIndex * Add typing.get_origin() and get_args() * Add unicodedata.is_normalized * Add unittest.mock.AsyncMock Currently this is just an alias for Any like Mock and MagicMock. All of these classes should probably be sub-classing Any and add their own methods. See also #3224. * Add unittest cleanup methods * Add IsolatedAsyncioTestCase * Add ElementTree.canonicalize() and C14NWriterTarget * cProfile.Profile can be used as a context manager * Add asyncio task name handling * mmap.flush() now always returns None * Add posonlyargcount to CodeType
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import sys
|
||||
from types import TracebackType
|
||||
from typing import Any, Optional, Dict, Callable, Type
|
||||
from typing import Any, Optional, Dict, Callable, Tuple, Type, Union
|
||||
from tkinter.constants import * # noqa: F403
|
||||
|
||||
TclError: Any
|
||||
@@ -389,6 +390,8 @@ class Canvas(Widget, XView, YView):
|
||||
def tag_lower(self, *args): ...
|
||||
lower: Any
|
||||
def move(self, *args): ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def moveto(self, tagOrId: Union[int, str], x: str = ..., y: str = ...) -> None: ...
|
||||
def postscript(self, cnf=..., **kw): ...
|
||||
def tag_raise(self, *args): ...
|
||||
lift: Any
|
||||
@@ -615,6 +618,9 @@ class PhotoImage(Image):
|
||||
def get(self, x, y): ...
|
||||
def put(self, data, to: Optional[Any] = ...): ...
|
||||
def write(self, filename, format: Optional[Any] = ..., from_coords: Optional[Any] = ...): ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def transparency_get(self, x: int, y: int) -> bool: ...
|
||||
def transparency_set(self, x: int, y: int, boolean: bool) -> None: ...
|
||||
|
||||
class BitmapImage(Image):
|
||||
def __init__(self, name: Optional[Any] = ..., cnf=..., master: Optional[Any] = ..., **kw): ...
|
||||
@@ -635,10 +641,15 @@ class Spinbox(Widget, XView):
|
||||
def scan(self, *args): ...
|
||||
def scan_mark(self, x): ...
|
||||
def scan_dragto(self, x): ...
|
||||
def selection(self, *args): ...
|
||||
def selection(self, *args: Any) -> Tuple[int, ...]: ...
|
||||
def selection_adjust(self, index): ...
|
||||
def selection_clear(self): ...
|
||||
def selection_element(self, element: Optional[Any] = ...): ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def selection_from(self, index: int) -> None: ...
|
||||
def selection_present(self) -> None: ...
|
||||
def selection_range(self, start: int, end: int) -> None: ...
|
||||
def selection_to(self, index: int) -> None: ...
|
||||
|
||||
class LabelFrame(Widget):
|
||||
def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ...
|
||||
|
||||
Reference in New Issue
Block a user