Grzegorz Śliwiński and Jelle Zijlstra
81191e49a3
click.*option function parameter to accepts bool and Text ( #1699 )
...
This follows documentation and code which allows to use both bool and Text.
Update all the prompt arguments for all *option functions in click.decorators module
since they're mostly proxying the call to option setting desired defaults.
closes #1693
2017-11-03 22:52:12 -07:00
Patrick Valsecchi and Jelle Zijlstra
aafa556a10
Add context manager methods to requests.Response ( #1701 )
...
* Add context manager methods to requests.Response
* Simplified the requests.Response.__exit__ signature
2017-11-01 08:19:43 -07:00
Guido van Rossum and GitHub
77c06d411c
Remove type annotation from some Loader args ( #1695 )
...
There were two problems AFAICT:
- There are multiple Loader classes without a common base class,
so this should really be a union or a protocol.
- The argument is supposed to be a class, not an instance.
Rather than figuring out a fix (which would probably require some
nasty refactoring) I'm just going back to the old situation where
these arguments are implicitly annotated with `Any`.
See also https://github.com/python/typeshed/pull/1657#pullrequestreview-72049880
2017-10-27 09:30:16 -07:00
Ilya Konstantinov and Jelle Zijlstra
ab9733b448
Support for response hooks in requests ( #1674 )
2017-10-26 10:56:05 -04:00
Ilya Konstantinov and Jelle Zijlstra
9a10c74345
requests.Session.headers and proxies not optional ( #1676 )
...
```
>>> import requests
>>> s = requests.session()
>>> s.headers
{'User-Agent': 'python-requests/2.18.4', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'}
>>> s.proxies
{}
```
2017-10-25 16:50:59 -04:00
Wilfred Hughes and Matthias Kramm
72e24b8443
Add basic type annotations for YAML load functions ( #1657 )
...
These are probably the most common YAML functions, so this should be useful even without type declarations on the rest of the package.
2017-10-20 10:18:47 -07:00
rymdhund and Jelle Zijlstra
feac49ac7f
requests.post data arg accepts an iterable of tuples ( #1660 )
2017-10-10 08:16:38 -07:00
Max Rozentsveyg and Jelle Zijlstra
c68dcf1870
Add definitions for boto/utils.py ( #1579 )
2017-10-04 21:44:10 -07:00
Lloyd and Jelle Zijlstra
6c0fa96e4c
Add pymysql.connections.Connection#begin(self) stub ( #1636 )
2017-10-03 12:05:51 -07:00
Jonathan Schoonhoven and Jelle Zijlstra
dc46a435da
allow all valid JSON in pynamodb JSONAttribute ( #1604 )
...
Currently, the type definition for `JSONAttribute` assumes the deserialized value will be a `dict`. However, a `list` is also a valid `JSONAttribute` (its [deserialize](https://github.com/pynamodb/PynamoDB/blob/495eae28679c781afc27f7d2d8c417e2302ed2a1/pynamodb/attributes.py#L418 ) method just calls `json.loads`.
2017-09-22 06:57:51 -07:00
Tim Crawford and Jelle Zijlstra
341237339c
requests: Add return type for __init__ methods ( #1574 )
2017-08-25 20:34:56 -07:00
Ivan Levkivskyi and Łukasz Langa
42e2142f28
Add Protocol and runtime to typing_extensions ( #1564 )
...
* Add Protocol and runtime to typing_extensions
* Use private type variable
* Fix typo
* Bound type variable for runtime to only class objects
* Conform to version check specification
2017-08-21 13:22:48 -07:00
Ashwini Chaudhary and Jelle Zijlstra
46a73bb2e8
Added private method _basic_auth_str to stub for requests ( #1514 )
2017-08-11 17:11:28 -07:00
Zack Hsi and Jelle Zijlstra
6031b37be9
Add select_autoescape to jinja2 ( #1530 )
...
Fixes https://github.com/python/mypy/issues/3589 .
2017-08-07 17:19:45 -06:00
Pavel Pletenev and Guido van Rossum
b2df503cde
Add type annotations for emoji ( #1506 )
...
This adds type annotations for [`emoji` library](https://github.com/carpedm20/emoji/ )
2017-08-03 16:12:50 -07:00
Svyatoslav Ilinskiy and Guido van Rossum
7a580ed0a9
Re-export values for click library ( #1516 )
...
That way they can be used as
```
import click
click.<value>
```
2017-08-03 15:58:02 -07:00
Michael Lee and Jelle Zijlstra
1e04a8c1b8
Add stubs for typing_extensions module ( #1471 )
2017-07-23 12:19:49 -07:00
Jelle Zijlstra and Łukasz Langa
1515ed9f88
fix some abstract classes in third_party/ ( #1486 )
2017-07-19 20:27:22 +03:00
Ivan Levkivskyi and Jelle Zijlstra
d75ea88da5
Use 'as name' patter to re-export names from stubs (PEP 484) ( #1484 )
2017-07-14 21:31:53 -07:00
Roy Williams and Jelle Zijlstra
7720a90bde
Add stubs for pynamodb ( #1431 )
...
Approval here: https://github.com/pynamodb/PynamoDB/issues/209
2017-07-03 14:11:22 -07:00
Teemu R and Jelle Zijlstra
218ce96871
PyYaml: uncomment commented out imports and add missing classmethod decorators ( #1439 )
...
* uncomment yaml imports
* yaml: decorate classmethods
2017-06-30 22:22:55 -07:00
Jukka Lehtosalo and Jelle Zijlstra
9b612c9218
Add TypedDict total argument ( #1443 )
...
See https://github.com/python/mypy/pull/3558 for context.
2017-06-29 08:38:13 -07:00
Max Rozentsveyg and Jelle Zijlstra
d3f9c55203
Add type stub for requests.packages.urllib3.util.connection.HAS_IPV6 ( #1436 )
...
This is defined at https://github.com/requests/requests/blob/v2.14.2/requests/packages/urllib3/util/connection.py#L130
2017-06-26 11:52:24 -07:00
Guido van Rossum and GitHub
81f77b17ec
Remove double Optional[] ( #1423 )
2017-06-21 09:54:40 -07:00
Guido van Rossum and Jelle Zijlstra
04fe184dcf
Add flags to pass on --warn-unused-ignores and --no-implicit-optional to mypy ( #1421 )
...
* Add flags to pass on --warn-unused-ignores and --no-implicit-optional to mypy
* Make implicit Optional explicit in arg types (2and3 part)
* Convert {stdlib,third_party}/2 to explicit Optional
2017-06-20 22:18:49 -07:00
Thomas Grainger and Matthias Kramm
55f1883928
requests.(post|put|patch) json kwarg should be Any. ( #1387 )
...
```python
>>> requests.post('https://httpbin.org/post ', json=["ham", "spam", {"eggs": "bacon"}]).json()
{'args': {}, 'data': '["ham", "spam", {"eggs": "bacon"}]', 'files': {}, 'form': {}, 'headers': {'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate', 'Connection': 'close', 'Content-Length': '34', 'Content-Type': 'application/json', 'Host': 'httpbin.org', 'User-Agent': 'python-requests/2.17.3'}, 'json': ['ham', 'spam', {'eggs': 'bacon'}], 'origin': '82.70.100.78', 'url': 'https://httpbin.org/post '}
>>> requests.post('https://httpbin.org/post ', json=("ham", "spam", {"eggs": "bacon"})).json()
{'args': {}, 'data': '["ham", "spam", {"eggs": "bacon"}]', 'files': {}, 'form': {}, 'headers': {'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate', 'Connection': 'close', 'Content-Length': '34', 'Content-Type': 'application/json', 'Host': 'httpbin.org', 'User-Agent': 'python-requests/2.17.3'}, 'json': ['ham', 'spam', {'eggs': 'bacon'}], 'origin': '82.70.100.78', 'url': 'https://httpbin.org/post '}
```
2017-06-08 11:53:26 -07:00
Alex Khomchenko and Matthias Kramm
25b3a818d3
add required to click.option decorator ( #1397 )
2017-06-08 11:52:25 -07:00
Michael Lee and Łukasz Langa
d25c5b9ce4
Move stubs for 'click' into 2and3 folder ( #1364 )
2017-06-02 11:01:24 -07:00
Yusuke Miyazaki and Jelle Zijlstra
2b79108ddc
Fix stub for ujson ( #1374 )
2017-05-30 23:20:40 -07:00
Jelle Zijlstra and Guido van Rossum
4f2dd0f446
remove unused type ignore flags ( #1346 )
...
Verified that none of those are necessary for pytype.
2017-05-26 08:28:51 -07:00
Emily Morehouse and Guido van Rossum
b6d08b81a3
#1286 Remove header comments from stubs ( #1292 )
...
- Updates documentation related to previously required comment headers.
- Removes all comment headers from stubs
- Occasionally included a header for stubs that were noted to be incomplete or contained todo's.
2017-05-22 15:14:15 -07:00
Jelle Zijlstra and Matthias Kramm
7dd2f80194
Fixes to ContextManager ( #1249 )
...
* add typing.ContextManager for 3.6+ only
This fixes the easier part of #655 .
Would it make sense to add a generic typing.ContextManager that exists in any Python version?
* update comment
* fix argument types for ContextManager.__exit__
* add AsyncContextManager
* add @asynccontextmanager
* typing.ContextManager now always exists
* back out async-related changes
Will submit those in a separate PR later
* fix import order
* AbstractContextManager only exists in 3.6+
* AbstractContextManager -> ContextManager
2017-05-08 16:21:51 -07:00
Naomi Seyfer and Jukka Lehtosalo
c96a64d421
Remove second empty line in mypy_extensions ( #1237 )
2017-05-02 21:41:23 +01:00
Naomi Seyfer and Jukka Lehtosalo
6a9d74d1c7
Args for "flexible callable" experimental mypy feature. ( #793 )
...
This is the typeshed for the constructors for the Arg types that we'll now be
able to pass to Callable. They really just return their type arguments.
2017-05-02 21:40:41 +01:00
Łukasz Langa and Jelle Zijlstra
f543ddd89a
Move yaml stubs to 2and3 ( #1155 )
2017-04-12 21:09:23 -07:00
Ashwini Chaudhary and Jelle Zijlstra
35b6795183
Stubs for boto.kms ( #1081 )
...
* Stubs for boto.kms
* Added types for params
* Added return type and fixed signatures(including review changes)
* Removed make_request from stub(https://github.com/python/mypy/issues/1237 ). Fixed Dict issue.
* Fixed typo
* Let's be precise about return type
2017-04-03 21:22:32 -07:00
Guido van Rossum and Jelle Zijlstra
03bfcee0b8
Remove sqlalchemy. ( #1105 )
...
See discussion in https://github.com/python/typeshed/pull/1094 .
If we do this we should make it easier in mypy to install 3rd party stubs that are used by default.
2017-03-28 08:25:00 -07:00
Jelle Zijlstra and Guido van Rossum
8318953a17
remove if TYPE_CHECKING in sqlalchemy stub ( #1074 )
...
This isn't needed in typeshed, since the stubs aren't executed.
2017-03-22 08:02:38 -07:00
Stefan Urbanek and Jelle Zijlstra
5b47bc956e
Added SQLAlchemy annotations ( #1029 )
...
* Added SQLAlchemy annotations
* Made Connection and Engine sublcasses of Connectable (python/typeshed#1018 )
* Moved execute() from Connection to Connectable
* Made RowProxy a Mapping and removed Mapping inherited methods
* Made ResultProxy an Iterator of RowProxy
* Added most relevant methods for fetching of ResultProxy
* Added where(), group_by(), order_by() and limit() to Select
* Follow squalchemy module structure
* Created sqlalchemy.engine.result and moved ResultProxy and RowProxy
there
* Created sqlalchemy.engine.interfaces and moved Connectable there
* Added non-deprecated methods to Connectable: connect,
contextual_connect and scalar
* Fixed return type of scalar() to Any
* Missed ResultProxy scalar return
... had it in Connectable only.
2017-03-21 23:11:41 -07:00
Jelle Zijlstra and Łukasz Langa
37a854630c
merge 2 and 3 stubs for requests ( #1017 )
...
* merge 2 and 3 stubs for requests
* fix version comparison
2017-03-18 16:39:40 -07:00
Jelle Zijlstra and Guido van Rossum
eb07fd3c1a
make sure typevars defined in stubs are private ( #989 )
...
And also a few type aliases I noticed in the process.
Found using https://github.com/JelleZijlstra/stublint/commit/59f9cac0951f431fbc3abf8803adeaac6e489aac
2017-03-13 07:32:40 -07:00
Tim Abbott and Łukasz Langa
e3831d8d80
jinja2: Add InternationalizationExtension elements. ( #942 )
...
Fixes #927 .
2017-02-20 11:09:44 -08:00
Ivan Levkivskyi and Guido van Rossum
22c0353498
Add missing imports from typing ( #933 )
2017-02-14 10:59:00 -08:00
Adam Marszałek and Guido van Rossum
ca36070d51
Improved pytz support for timezone function ( #911 )
2017-02-03 10:54:59 -08:00
Alexey and Guido van Rossum
f398628948
Adding pymysql stubs to third_party/2and3 ( #861 )
...
(Original by @ghagerer, extracted from #647 by @WouldYouKindly.)
2017-01-29 21:01:49 -08:00
Lukasz Langa
c88d865520
Missing variable annotations were failing mypy tests
2017-01-24 15:21:55 -08:00
Alexey and Guido van Rossum
ccdc609706
Update sqlalchemy stubs ( #857 )
...
I believe this covers both #647 and #719 .
Moved sqlalchemy stubs from 2 to 2and3;
changed sqlalchemy/util/compat.pyi:37 to be of type typing.Text;
added incomplete stubs for sqlalchemy.orm.utils and slqalchemy.sql.elements.ColumnElement.
2017-01-23 15:56:30 -08:00
Ryan C. Thompson and Guido van Rossum
d18484095e
atomicwrites: add pyi file ( #705 )
...
Authorized by atomicwrites author here:
https://github.com/untitaker/python-atomicwrites/pull/23#issuecomment-260422021
2017-01-09 15:13:48 -08:00
David Fisher and Łukasz Langa
2cb8e184cc
Add NoReturn ( #811 )
...
* Add NoReturn
2017-01-04 13:38:05 -08:00
Guido van Rossum and Łukasz Langa
231f00d7da
Fix boto stubs.
...
Replace two `FIXME` comments with `type: ignore`.
See https://github.com/python/mypy/issues/1237 .
2016-12-24 09:06:38 -08:00