Commit Graph

3700 Commits

Author SHA1 Message Date
Sebastian Rittau
dc0bfc5889 Make FeedParser generic over Message (#4375) 2020-08-04 09:32:38 -07:00
Áron Ricardo Perez-Lopez
a770110497 Mark __next__, __iter__, and close in Generator as concrete (#4385)
Closes #4384
2020-08-04 12:16:35 +02:00
Ran Benita
cd132ff161 stdlib/3/inspect: fix _ParameterKind being an empty enum (#4383)
This makes mypy think that conditions like

    parameter.kind is Parameter.POSITIONAL_OR_KEYWORD

are always false, which triggers `unreachable` warnings, among other
problems.
2020-08-04 11:02:36 +02:00
Igor Nehoroshev
8ae5549b61 Add stub for typing_extensions.get_args (#4373) 2020-08-03 12:49:18 -07:00
frehoy
7894269bb5 Proposed fix for tarfile.add() accepting Path name and arcname (#4369)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2020-07-31 16:55:45 +02:00
Akuli
8bf7efe94e add types for tkinter geometry manager (aka pack,grid,place) methods (#4379) 2020-07-31 14:34:47 +02:00
Akuli
09c91a00ac add type hints for tkinter.Variable and its subclasses (#4378) 2020-07-31 10:53:57 +02:00
Jaromir Latal
c96b1ae1bf [stdlib][unittest] Fix mock.call(...) types (#4374)
Co-authored-by: Jaromir Latal <jaro@fb.com>
2020-07-30 22:02:08 +02:00
Omar Sandoval
7b29927c4b Add missing warn_on_full_buffer argument to signal.set_wakeup_fd() (#4377)
According to
https://docs.python.org/3/library/signal.html#signal.set_wakeup_fd, this
was added in Python 3.7.
2020-07-30 20:52:17 +02:00
Sebastian Rittau
7ed8c5f1da Add select.epoll.register to stubtest whitelist (#4376)
Python 3.8.5 changed the docstring slightly, possibly
a problem in stubtest.
2020-07-30 19:29:34 +02:00
Sebastian Rittau
36356b3368 Remove argument from deque.pop() (#4367)
Closes: #4364
2020-07-27 06:49:56 -07:00
Sebastian Rittau
06f87e5c92 Simplify pathlib (#4357)
* Enable some branches for Python2 pathlib2
* Define an alias _PathLike, instead of using multiple branches
* Drop a Python 3.4 branch (the Python 2 branch is identical to
  the 3.5+ branch)
* Move Path.__new__ to the top
2020-07-27 06:08:09 -07:00
karl ding
8f50cd9d0e Add missing syslog facility codes (#4366)
Add support for the following syslog facilities:

  - LOG_NTP
  - LOG_SECURITY
  - LOG_CONSOLE
  - LOG_SOLCRON

In addition, reorder the entries to match the CPython implementation to
make it easier to read.
2020-07-27 12:34:12 +02:00
Ian Good
a472c9b543 Fix Policy.header_source_parse return type (#4365) 2020-07-27 08:38:40 +02:00
Sebastian Rittau
cfd06e2d3c Enable aliases in pytest_mock (#4359)
* Require newer pytype
2020-07-25 12:13:00 -07:00
Akuli
2c37551fd1 make tkinter.Event generic and add missing type hints to bind methods (#4347) 2020-07-25 14:23:26 +02:00
Vegard Stikbakke
51fd8b2a06 Fix Filter.filter return type - bool, not int (#4358) 2020-07-24 20:25:06 +02:00
Shannon Zhu
b45e6cfbf6 Make TypeAlias stub a valid annotation (#4354) 2020-07-22 17:31:21 -07:00
Akuli
9efc9d8818 add tkinter.font stub (#4350) 2020-07-22 11:46:04 -07:00
Jaromir Latal
09718c6a03 [requests] Add _content to Response (#4353)
Co-authored-by: Jaromir Latal <jaro@fb.com>
2020-07-22 17:46:51 +02:00
Peter Law
29dec525e7 Add pydoc_data (#4351)
This appears to be used by jedi at least, so it would be great to
have stubs for it.
2020-07-21 18:14:03 -07:00
Shantanu
bc6da51495 asyncio: export submodules (#4346)
Resolves #4345

Co-authored-by: hauntsaninja <>
2020-07-21 09:34:00 +02:00
Rebecca Chen
537b730558 Update to pytype 2020.07.20 and remove nmap from the exclude list. (#4348) 2020-07-20 23:01:21 -07:00
Sabby6
42d20c4a07 pkg_resources: Add missing methods of pkg_resources.DistributionNotFound (#4344) 2020-07-20 19:31:50 +02:00
github-actions[bot]
334f77a2d7 Remove unused stubtest whitelist entries (#4340)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-07-18 17:27:28 +02:00
Sebastian Rittau
18aab6df0f Fix type in yaml file (#4339) 2020-07-18 07:03:23 -07:00
Sebastian Rittau
6acf0ef5f2 Create a PR when there are unused stubtest whitelist entries (#4334) 2020-07-18 14:48:55 +02:00
Philipp Hahn
e44ac21d98 optparse: option_class is Type[Option] (#4338)
It's a `class`, not an `instance`.

<https://docs.python.org/2.7/library/optparse.html#optparse.OptionParser>
2020-07-17 20:50:02 +02:00
Sebastian Rittau
ee77a359eb Use 'black' profile for isort (#4336) 2020-07-17 07:20:48 -07:00
Magnus Watn
12f93797ff Change dotted_string from method to str (#4335) 2020-07-17 15:02:52 +02:00
Shantanu
d998d37954 multiprocessing: revert changes to queue classes (#4314)
Partial revert of #4289. Fixes #4313
2020-07-16 15:03:25 -07:00
Sebastian Rittau
5e76f51930 Upgrade to isort 5 (#4323)
This now also reformats imports not at the top of files.
2020-07-16 07:01:57 -07:00
Andre Delfino
1e0e40f61c Use Mapping for requests _Data (#4327) 2020-07-13 14:00:52 +02:00
Shantanu
5ecdc08bb1 tarfile: fix arg name (#4326)
And update whitelist since #4322 fixed a thing

Co-authored-by: hauntsaninja <>
2020-07-12 20:27:43 +02:00
Sebastian Rittau
9ad8ed3b75 Introduce Mapping-like protocols (#4325)
typing.Mapping is not a protocol, which has caused problems in the past.
(E.g. python/typeshed#3569, see also python/typeshed#3576.) This
introduces a few narrow protocols to _typeshed.pyi that can be used in
place of Mapping.

Not all uses of Mapping can be replaced. For example, cgi.FieldStorage
explictly checks whether the supplied headers argument is a Mapping
instance.
2020-07-11 17:11:08 -07:00
Jonathan Slenders
028f0d5293 Fix: TarFile.tarinfo is a Type instead of instance. (#4322)
Co-authored-by: Jonathan Slenders <jslender@cisco.com>
2020-07-10 12:22:04 +02:00
Alex Grönholm
ad89dee03b Fixed return type of getaddrinfo() everywhere (#4304) 2020-07-10 10:46:28 +02:00
Joshua Oreman
e6736cde8d ctypes: allow cast() 1st argument to be int and 2nd argument to be Type[py_object] (#4311) 2020-07-10 10:44:23 +02:00
Sebastian Rittau
209b6bb127 Remove tornado stubs (#4321)
Current tornado releases feature inline annotations and ship with
a py.typed file.
2020-07-09 07:20:11 -07:00
Jonathan Slenders
8e69672587 Fix for cryptography Extensions.get_extension_for_class. (#4320)
Co-authored-by: Jonathan Slenders <jslender@cisco.com>
2020-07-09 11:25:02 +02:00
Matan Gover
c64ecf5808 Flask.root_path cannot be None (#4319)
Extension of #2792 (see #2791). See [implementation](4e854ee496/src/flask/helpers.py (L959)).
2020-07-08 17:41:11 -07:00
Sebastian Rittau
03d8795403 Update unused stubtest whitelist action trigger (#4315)
Now runs weekly instead of daily, but also add the ability to trigger
manually.
2020-07-07 10:12:52 -07:00
Alex Grönholm
f9d469ac2b Fixed parameter and return types of getnameinfo() everywhere (#4305) 2020-07-03 15:46:02 +02:00
Steve B
c0e9c4f4c5 add overloads for combinations r 2-5 (#4309)
This doesn't cover everything but it means it a lot of common usages the type will be slightly more useful

Co-authored-by: steve brazier <steve.brazier@trioptima.com>
2020-07-03 15:23:43 +02:00
Jürgen Gmach
92f91ddfe8 Add typing for werkzeug.utils.secure_filename (#4308) 2020-07-03 15:08:03 +02:00
Jürgen Gmach
ee44a5c323 Update test setup description (#4307)
The description, as it was, did not work with an older version of pip,
as the installation errored. An updated version of pip fixes the installation problem.
2020-07-03 14:31:22 +02:00
Julian Mehnle
6d1c59d238 pymysql.err.Warning multiple-inherits from builtins.Warning and MySQLError. (#4303)
Previously we declared it as single-inheriting from only `MySQLError`.
2020-07-02 19:53:38 -07:00
John Snow
f26a82436c requests: add type hint for Session.send() (#4302)
This takes a PreparedRequest and returns a Response.

See https://github.com/psf/requests/blob/master/requests/sessions.py#L614
2020-07-01 15:31:37 -07:00
Federico Bond
4225ab2496 Export requests.utils module (#4301) 2020-07-01 10:55:55 -07:00
Ivan Levkivskyi
5c7cf9f75c Script for modular typeshed migration (#4259)
This reshuffles directory structure according to the specification in https://github.com/python/typeshed/issues/2491#issuecomment-611607557
2020-07-01 12:36:23 +01:00