Skip to content
This repository has been archived by the owner on Dec 27, 2021. It is now read-only.

Commit

Permalink
typeshed: update stubtest version (python#4739)
Browse files Browse the repository at this point in the history
* typeshed: update stubtest version

Includes changes from python/mypy#9680
I've already fixed all the true positives on typeshed.

* attempt to fix windows' _WarnFunction

Co-authored-by: hauntsaninja <>
  • Loading branch information
hauntsaninja authored Nov 1, 2020
1 parent 1ff92dd commit 620989b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/stubtest-unused-whitelist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -U pip
pip install -U git+git://github.com/python/mypy@af3c8be98f
pip install -U git+git://github.com/python/mypy@24fdf343
- name: Run stubtest
shell: bash
run: ./tests/stubtest_unused.py | tee stubtest-output-${{ matrix.os }}-${{ matrix.python-version }} || true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -U pip
pip install -U git+git://github.com/python/mypy@af3c8be98f
pip install -U git+git://github.com/python/mypy@24fdf343
- name: Run stubtest
run: python tests/stubtest_test.py --ignore-unused-whitelist
2 changes: 1 addition & 1 deletion stdlib/3/asyncio/windows_utils.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ from types import TracebackType
from typing import Callable, Optional, Protocol, Tuple, Type

class _WarnFunction(Protocol):
def __call__(self, message: str, category: Type[Warning], source: PipeHandle) -> None: ...
def __call__(self, message: str, category: Type[Warning] = ..., stacklevel: int = ..., source: PipeHandle = ...) -> None: ...

BUFSIZE: int
PIPE: int
Expand Down
2 changes: 2 additions & 0 deletions tests/stubtest_whitelists/py3_common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ threading.Thread.__init__
timeit.main
tkinter.Misc.grid_propagate
tkinter.Misc.pack_propagate
tkinter.Tk.report_callback_exception # A bit of a lie, since it's actually a method, but typing it as an attribute allows it to be assigned to
trace.CoverageResults.__init__
traceback.FrameSummary.__init__
traceback.TracebackException.__init__
Expand All @@ -380,6 +381,7 @@ typing.AwaitableGenerator
typing.IO.__iter__
typing.IO.__next__
typing.type_check_only
unittest.mock.patch # It's a complicated overload and I haven't been able to figure out why stubtest doesn't like it
urllib.error.ContentTooShortError.__init__
urllib.error.URLError.__init__
urllib.parse._DefragResultBase.__new__
Expand Down

0 comments on commit 620989b

Please sign in to comment.