Ecosyste.ms: OpenCollective
An open API service for software projects hosted on Open Collective.
github.com/python/typing
Python static typing home. Hosts the documentation and a user help forum.
https://github.com/python/typing
This puts ProtocolTests in a big ``if HAVE_PROTOCOLS: ...` branch.
44128f13f9bbe3562e42a590632c5ab9182ad0a0 authored over 7 years ago5841d9ba4ee532c30be8fd13f23f88d0694ecdd5 authored over 7 years ago
* get_type_hints(): find the right globalns for classes and modules
This makes the default be...
468b3fe965fac7b11c0c306fff19c6d56b169b7a authored over 7 years agoThis is based roughly on the steps used in #453.
cc89ce8e10b0dab09938c9d3b6acdf4177ff09aa authored over 7 years agoThis should hold on Python 3.3 and newer (it does not hold on 3.2 and 2.7).
From documentatio...
e30fd55188c2857aa6fa763324840652a6720512 authored over 7 years agoThis solves issues with pytest-xdist requiring pytest>=3.0
4e7c4b61acd36e6e3615810ffa46abbd7a54f9ab authored over 7 years ago
Also update metadata to remove compatibility with 3.5+, and add Ivan
to the list of authors.
This pull request adds a 'typing_exensions' subproject to 'typing'. The
'typing_extensions' mod...
* Inline _geqv and _gorg
* Fix typo
* Cut MROs in half
* Avoid recursion on _gorg
* ...
2b6932a85a3b5e2f334c596035d7abefdcbbb0d7 authored over 7 years ago
Our `setup.py` file explicitly throws an error when users try and
install typing for Python 3.0...
This PR adds a gitter chat icon for the newly created python/typing room.
eb96eb7414272a37dedb2a46a0ba03a8fef51dcc authored over 7 years agoAsynchronous context managers are defined by PEP 492, but there is no corresponding generic abst...
74bc3ee08feb39a49d8f436cff7175def4ba9d01 authored over 7 years ago
So that there is a way to type hint for a context manager even on
language versions before 3.6....
d9e477ede48f5ec5f50213f0d9db6c7d92cc3287 authored almost 8 years ago
53679b1a04ae89b62ea4d505322ba83ef9d8ae0e authored almost 8 years ago
c86f9bfa14d453d1abdf06fa54d7bd776e2206d9 authored almost 8 years ago
ffb0caf6857c88f2353d6d1975768c5ca3115038 authored almost 8 years ago
* Add missing mod_generics_cache.py to MANIFEST.in
* Don't duplicate lines
7dfedb20a0161500b678a70791923f810c0c4f81 authored almost 8 years ago* Add NoReturn type
* Simplify NoReturn checks
48082ad23e6b34ab3e4507569e7b937df563ae4f authored almost 8 years agoc5f842d10232c2bdc5d8b51f6265e67805a01a36 authored almost 8 years ago
f264669254f0e6121f683e74e2947aa6e4b43b6f authored almost 8 years ago
Also, drop py32 from tox.ini since it cannot work anymore. Include py35 and
py36 instead.
ad956f4291b3a654151dfacb3d6de1b612a63e79 authored almost 8 years ago
Add missing open parenthesis
b185b8d310c3cd026b41067ddc03a009a61b8bba authored almost 8 years ago78fab13a1f75d3323f5caa4b5aba4c2f681ce438 authored almost 8 years ago
* Initial implementation (tests and PY2 port needed)
* Tests and PY2 backport
* Be more co...
07fdb60c6ac43ef7c40af61c9bb1e21d289b2843 authored almost 8 years ago* Fix name and imports for test module mod_generics_cache
* Fix lint
c53963f8e81b3646ca2adf51e3e21b8aab9664ba authored about 8 years ago* Add more tests based on coverage report
* Fix lint on PY2
* Simplify PR to only tests an...
370a137a70f5d9e4802aa0fb5f562a83f0222611 authored about 8 years ago* Optimize ABC negative cache for generics
* Add also positive cache and registry links
* ...
58c86ad81fca6c12ad0aa43b4f2abab07a537bac authored about 8 years ago* Add typing.Counter
Pretty much copied from deque.
* also add ChainMap
Only to the Pyt...
d6390f31719a6da316abe0c26b38fa4cc19fec3c authored about 8 years ago* Allow owerriding some methods in NamededTuple
* Fix lint
* Response to review comments (...
33560c8ae7adc28d0f57745907652bc7bf59e7a0 authored about 8 years ago2d85d8c7b8a0f9c5868c526a00a75c598581122a authored about 8 years ago
* Added support to get_type_hints for builtin methods like object.__init__ or object.__str__ etc...
440dcdee00938e7fac0be1b23c9141b527b6f7b2 authored about 8 years ago* Prepend bases with _gorg on subscription
* Simplify code
1229efb63e588e2a1a7ebc1ce0d4b55ce7997b5c authored about 8 years ago* Add some tests based on coverage report
* Fix lint
d149ce7212289e909203eb3a77a73408650f8865 authored about 8 years ago* fix running tests directly in py2
* use test_typing
75380ac5a7502df5ee661ced60a2ec71ab0a3430 authored about 8 years agod1e18604fb24f8fa72efed116dfe0aa73be91a1a authored about 8 years ago
239b3a332f0332bce78c6ddb2ec2c0f0b139d704 authored about 8 years ago
* Fix hash of GenericMeta classes
* Fix lint
* Fix for Python 3.2 repr()
abfdf497faa8d745b19f3a8ea919dcb29d73e761 authored about 8 years ago27f6d630ac480ccbef55ed98e1d54bf9b558c8d2 authored about 8 years ago
* Raise AttributeError on name collision in NamedTuple
961ebc67ee390cd3cd27f24dd0d090c31077753c authored about 8 years ago* Allow defining methods in NamedTuple class syntax
6e337a85386e8b6e412997701378dc810683d100 authored about 8 years agoa15575f78a02909f2c11a62e084bd678a4852bbc authored about 8 years ago
Rationale: closer to the PEP 8 mandated 79 for the standard library, while
requiring minimal cha...
1fbe5f0c20f1bf744a10c1b088d6db89b265f244 authored about 8 years ago
8a38e1ba0e32f774b0e6027b43278346a0dae7f2 authored about 8 years ago
e9e889998694fba820f4bf8b1f6405e73fd9b592 authored about 8 years ago
3af51faad701607feeb23bc2f22fb5525b5ec475 authored about 8 years ago
5a2ab63e61e552cbbd91a97b496c65b5ff1135cb authored about 8 years ago
f5b2a0c86a95fde4ca25d3bb371447fc0d8ba958 authored about 8 years ago
For now this requires a test-specific config while I plow through the warnings
that are specifi...
177d671ebef3ce66d345cc40daceeac542874f28 authored about 8 years ago
Since this was related to the same lines in conditions, also fixed binary
operators on line beg...
1830f2e68acdce3cc98f89067d6dece43146eecb authored about 8 years ago
17e1b5b526c1bbe93adce133a66375b1db857250 authored about 8 years ago
6590133f0eb8c4b4d1c4b3febc929e6931a3e63a authored about 8 years ago
New versions are not supported on Python 3.2.
e62cd7ca22b955c2f80bbbdbe098e6f1e6df0f38 authored about 8 years ago
E226 whitespace around operator
E251 unexpected spaces around keyword / parameter equals
E261 at...
2f5d978165ff1e6c550bc439f81b8dddf7bd0bf1 authored about 8 years ago
* add AsyncGenerator
* AsyncGenerator: remove redundant __new__, add test case for instantiat...
56abd8fce1bbfc480314ddf5ab8891eddea4f4bd authored about 8 years ago8b71862a784a7ae2b7fa91d83498d6d011fa6db0 authored about 8 years ago
e081e9a7a496f16bd0e5d2f9be809030be8f864a authored about 8 years ago
This lets you write:
class Employee(NamedTuple):
name: str
id: int
...
Fixes http://bugs.python.org/issue29246
This is an extended version of the fix proposed on b....
5937829695653bb0b68ad13cbcf626ad1ea12488 authored about 8 years agoFixes #347
This is a simple fix (also fixes situations where a random class has a _subs_tree ...
093982ae56ea3f00739d5e9b24af97c00bcf04b2 authored about 8 years agoFixes #345
This is a simple fix adding __weakref__ to __slots__ in _TypingBase (+ test with a...
1f24f8ec200c2b0ffc817cac913c7d0ca40560bb authored about 8 years ago
NamedTuple field types are now stored in OrderedDict
in __annotations__ attribute.
_field_type...
Fixes #335
I added GenericMeta to __all__ and added docstrings to GenericMeta and GenericMeta...
093ad886f86ab557fff7bcab0b3a028c78860db4 authored about 8 years agoFixes #353
e3ec7cc7290467be4023ae3507ff6eae02657fc2 authored about 8 years ago60c8fc785c28950c77e598b46cdf3903944b8875 authored about 8 years ago
c2db22ce8eecf42dc5cd6429bfa0cced29320b77 authored about 8 years ago
67d3b426fb3ba8665d0534ba57260aed48e4b1f2 authored about 8 years ago
Fixes #297
This allows to use isinstance() with classes that inherit from protocols in typing...
1881ffd3d1114c0563bf8d02ca7b8d1c6751bafa authored about 8 years agoe3aafd8c24e777493d943e91305ee35aef8a9557 authored about 8 years ago
Fixes #302
Example:
Employee = NamedTuple('Employee', name=str, id=int)
Note that thi...
4327f9b5b3cc868cdd232dd235fad59a21ae3361 authored over 8 years ago2e422124cd4621c57eaf99c391ee5ffad4b558c2 authored over 8 years ago
c8f98639624029d68e57b2b55d37025572568093 authored over 8 years ago
backport of #325 to Python 2
98bd328c54c07a182eed098da3dd8182c28fdf96 authored over 8 years agoSee http://bugs.python.org/issue28649 (this is roughly typing-clear-caches.patch)
01900fb852c66a01380f48204554581a3c525949 authored over 8 years agoSee http://bugs.python.org/issue28649 (this is roughly fix-typing-test-v2.diff)
aaeaa9c2c1fffe0effe49787049f35cb61a3e190 authored over 8 years agocf7ba5d59357ba9fe5bb63453a6413d5d36adfb4 authored over 8 years ago
* Unify 3.2 and 3.3+ code; this naturally allows arbitrary objects with __annotations__
* Aba...
3777afcad68a95082fa198c58243b1c196222909 authored over 8 years agoacb470afe95863bd2b97b2e78a429609c0e2f022 authored over 8 years ago
Fixes #313
b75073d99cd05132ec9746be6a1c14e949f92a73 authored over 8 years agoa2a4c96ce031b2af1ec12855f62b827dac735901 authored over 8 years ago
3fffbbe36c1aa75fa33d4f0bd2f0bb9ade882f11 authored over 8 years ago
74b096f3e2403aee65b9b97dab0fc040cbd5e9f6 authored over 8 years ago
Fixes #306
I also improved pickling a bit, but as you could see from tests, the list of thing...
930109db39a733337805899e9b0a8f61b163cb21 authored over 8 years ago
Fixes #301 now ``List[Tuple[T, T]][int] == List[Tuple[int, int]]``
Fixes #298 now ``Table = Tup...
3ca16827a103270ebc36f98b23986763afcd31af authored over 8 years ago
d2cb8b84d7a5f4c27208c3a8722756be8a93862b authored over 8 years ago
f9b02008db07a2570f1b4db29da01f0b2deb6355 authored over 8 years ago
f99682feffc1b537b2060f44e0a75496d10a628c authored over 8 years ago
6ce11ec4a02514bf09ebf851cb0df2bcff2a75e2 authored over 8 years ago
Fixes #250
The main idea here is optimizing generics for cases where a type information is ad...
a38bdac6e474ce61fc2f410b588c441dad1f6ddb authored over 8 years ago8988cd9c1c317104852d91fb09a06fb491b91545 authored over 8 years ago
4425da941958de5ca498847d7b80f266ce270f46 authored over 8 years ago
Here I am adding tests as discussed with @bintoro (related to #207).
These tests actually re...
126d3beae9daf62ae8666f561ea2028073500f87 authored over 8 years agoFixes #290.
2dbf3fd1c8a516864c5f92d71275d136bcd70f84 authored over 8 years agoa5d54a762cc5ee5ddfc75f2b69410b3296cf7218 authored over 8 years ago