mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Update tkinter.Text.count() for Python 3.13 (Akuli's version) (#12629)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
import tkinter
|
||||
import traceback
|
||||
import types
|
||||
@@ -52,3 +53,23 @@ assert_type(t.count("1.0", "2.3", "indices", "lines", "chars", "update"), Tuple[
|
||||
assert_type(t.count("2.3", "2.3", "indices", "lines", "chars", "update"), Tuple[int, ...]) # (0, 0, 0)
|
||||
assert_type(t.count("1.0", "2.3", "indices", "lines", "chars", "ypixels"), Tuple[int, ...]) # (15, 1, 15, 19)
|
||||
assert_type(t.count("2.3", "2.3", "indices", "lines", "chars", "ypixels"), Tuple[int, ...]) # (0, 0, 0, 0)
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
assert_type(t.count("1.0", "2.3", return_ints=True), int) # 15
|
||||
assert_type(t.count("2.3", "2.3", return_ints=True), int) # 0
|
||||
assert_type(t.count("1.0", "2.3", "indices", return_ints=True), int) # 15
|
||||
assert_type(t.count("2.3", "2.3", "indices", return_ints=True), int) # 0
|
||||
assert_type(t.count("1.0", "2.3", "indices", "update", return_ints=True), int) # 15
|
||||
assert_type(t.count("2.3", "2.3", "indices", "update", return_ints=True), int) # 0
|
||||
assert_type(t.count("1.0", "2.3", "indices", "lines", return_ints=True), Tuple[int, int]) # (15, 1)
|
||||
assert_type(t.count("2.3", "2.3", "indices", "lines", return_ints=True), Tuple[int, int]) # (0, 0)
|
||||
assert_type(t.count("1.0", "2.3", "indices", "lines", "update", return_ints=True), Tuple[int, ...]) # (15, 1)
|
||||
assert_type(t.count("2.3", "2.3", "indices", "lines", "update", return_ints=True), Tuple[int, ...]) # (0, 0)
|
||||
assert_type(t.count("1.0", "2.3", "indices", "lines", "chars", return_ints=True), Tuple[int, ...]) # (15, 1, 15)
|
||||
assert_type(t.count("2.3", "2.3", "indices", "lines", "chars", return_ints=True), Tuple[int, ...]) # (0, 0, 0)
|
||||
assert_type(t.count("1.0", "2.3", "indices", "lines", "chars", "update", return_ints=True), Tuple[int, ...]) # (15, 1, 15)
|
||||
assert_type(t.count("2.3", "2.3", "indices", "lines", "chars", "update", return_ints=True), Tuple[int, ...]) # (0, 0, 0)
|
||||
assert_type(
|
||||
t.count("1.0", "2.3", "indices", "lines", "chars", "ypixels", return_ints=True), Tuple[int, ...]
|
||||
) # (15, 1, 15, 19)
|
||||
assert_type(t.count("2.3", "2.3", "indices", "lines", "chars", "ypixels", return_ints=True), Tuple[int, ...]) # (0, 0, 0, 0)
|
||||
|
||||
Reference in New Issue
Block a user