Naomi Seyfer and Jukka Lehtosalo
38d356503d
Increase compatibility of itsdangerous URLSafeSerializerMixin & Serializer ( #712 )
...
I'm preparing a PR to mypy that further formalizes and improves the rules for
which functions are "compatible" with each other, both for subtyping and for
assignment. This is the one place in the stubs that violates the new rules but
not the old: the supertype `Serializer` can take an optional positional argument
called `serializer` to `load_payload`, but until this diff the mixin used to
implement it could not, but rather could only take `serializer` as a named
argument, through its **kwargs.
2016-12-01 11:48:56 +00:00
Roy Williams and Łukasz Langa
0391e72a6e
Expose pytz.UTC as an instance as opposed to as a class ( #723 )
...
* Expose pytz.UTC as an instance as opposed to as a class
pytz shadows UTC after declaring it with a singleton:
https://github.com/newvem/pytz/blob/master/pytz/__init__.py#L135
This fixes https://github.com/python/typeshed/issues/710
2016-11-29 23:04:53 -08:00
Roy Williams and Łukasz Langa
1dff8e4a45
Add stubs for markupsafe ( #718 )
...
* Add stubs for markupsafe
* Add more specific types for markupsafe
This is needed for Flask. Permission was given here:
https://github.com/pallets/itsdangerous/issues/69#issuecomment-246516942
2016-11-29 13:32:12 -08:00
Guido van Rossum and Łukasz Langa
33c0134b70
Move PY2 werkzeug stubs to 2/ directory.
...
We no longer use 2.7/ since that is the only version.
2016-11-28 13:48:19 -08:00
Roy Williams and Guido van Rossum
021b162bc9
Add stubs for werkzeug ( #530 )
2016-11-28 10:50:57 -08:00
Lukasz Langa
5145a1119d
Complete stubs for Click 6.6 on Python 3.
...
Put under 3.6 as they use the wonderful PEP 526 syntax for annotating
class/instance members.
2016-11-26 20:19:51 -08:00
Roy Williams and Guido van Rossum
8305d51e75
Add more specific types for requests.session.Session.mount and BaseAdapter ( #674 )
2016-11-10 11:14:30 -08:00
Ruud van Asseldonk and Guido van Rossum
ca98a8ee91
Add ret_type keyword argument for croniter ( #668 )
...
The croniter __init__ method does have a ret_type keyword argument.
See also https://github.com/kiorky/croniter/blob/062fdc0/src/croniter/croniter.py#L66 .
2016-11-09 08:18:09 -08:00
Jakub Stasiak and Guido van Rossum
5a2a46d3bd
lxml: Document _Element.tag and __iter__ ( #650 )
2016-11-02 07:44:22 -07:00
Elazar Gershuni and Guido van Rossum
58d60343ba
fix self for thirdparty ( #646 )
2016-10-30 15:02:23 -07:00
TrueBrain and Guido van Rossum
15ec66cdd6
Consider __doc__ always Optional. ( #641 )
...
python/mypy#2380 showed a discrepancy between object and FunctionType in stdlib2. The first defined __doc__ to be str, the second Optional[str]. As FunctionType depends on object, this is no longer valid.
As suggested by @gvanrossum in python/mypy#2380 , all __doc__ should be considered Optional.
(Final verdict was just to remove most __doc__ attributes since it's inherited from object.)
2016-10-30 11:48:23 -07:00
Guido van Rossum and GitHub
cb97bb54c0
Move 2.7 to 2 ( #635 )
...
Closes #579 .
2016-10-26 16:24:49 -07:00
Herbert Ho and Guido van Rossum
3ea39a7c1b
update constraints definition for 2.7 sqlalchemy ( #630 )
2016-10-25 16:00:37 -07:00
Roy Williams and Guido van Rossum
bfbe4f8540
Update lxml stubs to add Element.append and Element.text ( #629 )
2016-10-25 12:04:42 -07:00
David Fisher and GitHub
ca318e444f
Fix strings that were really bytes in typed_ast ( #624 )
2016-10-19 16:34:41 -07:00
David Foster and Guido van Rossum
5c4300a4bd
Add mypy_extensions. ( #611 )
2016-10-17 16:39:17 -07:00
Calen Pennington and Guido van Rossum
5daf552f5b
Make viewkeys, viewitems, viewvalues use proper types now that the typing backport has them ( #602 )
2016-10-14 08:41:29 -07:00
Ivan Levkivskyi and David Fisher
70cfe793d9
Implement PEP 526 in typed_ast ( #548 )
...
See dropbox/typed_ast#16 .
2016-09-28 10:31:28 -07:00
Roy Williams and Guido van Rossum
b5e372bc7f
Add stubs for itsdangerous. ( #537 )
...
This is needed for https://github.com/python/typeshed/issues/28
2016-09-18 14:40:18 -07:00
Tim Abbott and Guido van Rossum
94e0625e82
Fix ujson stubs to properly use AnyStr. ( #540 )
...
The ujson module apparently will accept both bytes and text format
input, however, it does always output a str (both on Python 2 and
Python 3).
Some discussion in: https://github.com/python/typeshed/pull/460
2016-09-13 10:07:44 -07:00
Roy Williams and Matthias Kramm
5c52691954
Add more specific types for requests.sessions.Session ( #524 )
...
* Add more specific types for requests.sessions.Session
Once this is accepted I'd like to propegate these signatures to all of the
convience methods people actually use like get, post, put, etc...
* s/Optional[Union,/Union[None,/g
2016-09-09 12:23:32 -07:00
Michael Lee and Guido van Rossum
a257166149
Add missing type_comments attr to ast27.arguments ( #522 )
2016-09-07 11:55:27 -07:00
Drew Haven and Guido van Rossum
d56a5e80fb
Fix six.reraise stub to take an optional traceback ( #514 )
2016-08-31 11:31:49 -07:00
Michael Lee and Guido van Rossum
313b584e34
Add stubs for ujson ( #460 )
2016-08-11 17:08:03 -07:00
Jakub Stasiak and Matthias Kramm
9715995b2d
Remove undesired type variable from lxml.objectify ( #441 )
...
typing.AnyStr usage here was a mistake that I noticed too late,
from a GitHub comment[1]:
AnyStr is a type variable so in your version of
objectify.fromstring() the types if text and base_url have to
correspond -- but with unions they can each be either str or bytes,
and that's how the rest of the API is defined.
[1] https://github.com/python/typeshed/pull/436#issuecomment-237708512
2016-08-05 05:51:20 -07:00
Jakub Stasiak and Matthias Kramm
a14b1893d9
Add some missing lxml stub pieces ( #436 )
2016-08-04 10:40:13 -07:00
Roy Williams and Matthias Kramm
07bf49f55a
Add stubs for dateutil.relativedelta ( #421 )
2016-08-03 15:39:12 -07:00
Roy Williams and Guido van Rossum
fd66ff21ae
Add __version__ to protobuf module ( #429 )
2016-08-01 21:32:03 -07:00
Guido van Rossum and GitHub
39325bf159
Mypy now supports sys.platform and sys.version_info checks ( #410 )
2016-07-27 13:25:29 -07:00
Fabian Heredia Montiel and Matthias Kramm
4a408c014f
Add pytz basic typing ( #383 )
...
* Add pytz basic typing
* Add pytz.lazy basic typing
* Move the files to the correct path
* Move files to correct directory
* Ignore issue with different sig from supertype
2016-07-22 05:52:40 -07:00
Valérian Rousset and Guido van Rossum
a62d6207ab
Fix pkg resources ( #341 )
...
Add types to pkg_resources, mostly rewrote it based on the documentation.
Also remove pkg_resources._vendor which generated by stubgen but was implementation specific.
2016-07-17 21:05:39 -07:00
Michael Lee
4b46ca1b66
Remove unnecessary import
2016-07-12 17:10:32 -07:00
Michael Lee
ae14734bd2
Add stub for boto.exception (from stubgen)
2016-07-12 17:04:29 -07:00
Guido van Rossum and David Fisher
b63e09c239
Fix some issues for dateutil and argparse ( #357 )
...
* Fix stubs for 2.7/dateutil. They were pretty broken.
(The 3/dateutil share some of the brokenness but that's still a TODO.)
* Fix argparse stubs.
- Container is not strong enough for choices.
- add_subparsers() returns something with an add_parser() method.
2016-07-12 16:24:33 -07:00
Skip Montanaro and Guido van Rossum
2ce0e952eb
First pass at dateutil
2016-07-07 08:35:09 -07:00
garetht and Guido van Rossum
4fee66c90b
Make the 'symmetric' argument to SQLAlchemy's between optional. ( #327 )
2016-07-01 16:04:36 -07:00
Herbert Ho and Guido van Rossum
186b313f35
a few more stubs for sqlalchemy ( #301 )
2016-06-20 10:27:39 -07:00
Alvaro Caceres
d0ac66f5f8
Use "..." for attribute values, instead of None, [], {}
2016-06-15 14:10:04 -05:00
Skip Montanaro and Guido van Rossum
8b0ff828a6
First cut at stubs for pymssql.
2016-06-11 13:21:23 -07:00
Herbert Ho and Guido van Rossum
e46d308ab4
fleshing out some more stubs for sqlalchemy ( #282 )
2016-06-09 17:58:19 -07:00
David Euresti and Guido van Rossum
0bfa0636e1
Add http_client to six.moves, add missing functions to urllib2 fix some types in gettext ( #262 )
2016-06-04 12:02:55 -07:00
Tim Simpson and Guido van Rossum
917f99a01b
Support for 'from six.moves import http_cookies' ( #243 )
2016-06-02 11:07:59 -07:00
Valérian Rousset and Guido van Rossum
2b776cfb4e
complete urllib ( #241 )
2016-06-02 09:22:29 -07:00
Eklavya Sharma and Guido van Rossum
bb5c93a217
Add __version__ to requests ( #206 )
2016-05-17 21:28:45 -07:00
Michael R. Crusoe and Guido van Rossum
0be5a11496
A couple new definitions, some more unicode for 2.7 ( #185 )
...
* Action.__init__(); ArgumentParser.__init__() & print_help()
* pprint() & pformat()
* added unicode support to url{parse,split,join,defrag}
* add unicode support to requests.api
2016-05-06 09:14:49 -07:00
David Fisher and Guido van Rossum
e8f626536e
Add Python 3 ast module; update Python 2.7 ast module; fixup typed_ast ( #170 )
2016-05-04 10:40:36 -07:00
David Fisher and Guido van Rossum
25b18ebcc6
Add stubs for typed_ast ( #156 )
2016-04-22 15:59:30 -07:00
jukebox and Guido van Rossum
f5f349ca8f
dateutil stubs (Python 3)
...
PR #133
2016-04-22 08:04:58 -07:00
Drew Haven and Guido van Rossum
e8a477d69d
Simple stub for tornado.testing ( #145 )
2016-04-13 13:09:12 -07:00
Guido van Rossum
4f483dc314
Precision surgery to take out sqlalchemy test failures ( #140 )
...
* Comment out parts of the sqlalchemy stubs to make tests pass.
* Run all tests, one step per Python version.
2016-04-10 20:45:42 -07:00