Ecosyste.ms: OpenCollective
An open API service for software projects hosted on Open Collective.
github.com/python/mypy
Optional static typing for Python
https://github.com/python/mypy
This PR does not mean mypy supports PEP 612, but it does do enough to
unblock https://github.co...
Resolves #9691
As mentioned in that issue, this is a huge performance win. On the
codebase I...
Instead of loading the type and calling it via the vectorcall
convention let's use PyList_New /...
Resolves #10591
Co-authored-by: Jelle Zijlstra <[email protected]>
Co-authored-by: Sh...
`parse_conversion_specifiers` and `parse_format_value` from mypy.checkstrformat
can be reused ...
Fixes #10393
Co-authored-by: hauntsaninja <>
7d9f20af865be334cbf7670bfb361530c19ecbb0 authored over 3 years ago by Shantanu <[email protected]>Helps with #10842, #10820 and others
There have been a number of issues recently where having...
7b0df28a4cdc65601acaaeee72a9266137ffbe57 authored over 3 years ago by Shantanu <[email protected]>
Adds an example on how to use the OR-operator to combine two
regular expressions in order to ig...
bytearray is treated as a subtype of bytes by mypy, even though they behave
differently in som...
mypy.checkstrformat offers regex and ConversionSpecifier for tokenizer, thus
this PR:
* del...
84504b093769de6d3713438a12264a4362bd43c6 authored over 3 years ago by 97littleleaf11 <[email protected]>
When generating calls to registered implementations in the dispatch
function for a singledispat...
When trying to match `list[T]` and `list[str] | Any`, previously we
gave up, because the union ...
Replaces #9611.
10dc4510d9d4fd88ed8dbdc1735f130f334aede2 authored over 3 years ago by 97littleleaf11 <[email protected]>* Add test for singledispatch across multiple files
Add a test to make sure that we handle re...
9b101751cc3214b07799f9ef83258d38aefa4960 authored over 3 years ago by pranavrajpal <[email protected]>14e06c25f7a7a0fa19aa94c86f30e06f9d115e9e authored over 3 years ago by Shantanu <[email protected]>
* stubtest: import submodules mentioned in __all__
This kind of helps resolves #9935
Co-a...
6fd2dc2403889f7104648d8bfbb8df3f5e83b63f authored over 3 years ago by Shantanu <[email protected]>This PR is a follow-up to #10869.
The error msg of mypy now is basically the same as CPython....
bc1dc95486edf4f062a38eb7b78affb2268de39d authored over 3 years ago by 97littleleaf11 <[email protected]>According to [PEP461](https://www.python.org/dev/peps/pep-0461/), conversion type %c performs di...
b3b32427c9abac5a6e3311587745941365ae37cb authored over 3 years ago by 97littleleaf11 <[email protected]>
Recreating equivalent ParamSpecExpr objects causes the equality check in
is_same_symbol in add_...
* Add test
Add a test that makes sure that our implementation goes up the MRO of
the dispatc...
This feature is not-really known from my experience. I had to explain it several times to other ...
fb75cdc352c8a6da723800619fe05b4ecb4f6cf4 authored over 3 years ago by Nikita Sobolev <[email protected]>5d84eead94c305552dfb9a76441a1a0d5fb95bb1 authored over 3 years ago by Nikita Sobolev <[email protected]>
Closes https://github.com/mypyc/mypyc/issues/264
This PR adds a primitive op and a C helper f...
6bb22661096e97244e6319169194b97e7eea50ff authored over 3 years ago by 97littleleaf11 <[email protected]>This works around a change in virtualenv 20.x where the site-packages folder is added to the PYT...
a1863c901609991348a6e92448c143411e610065 authored over 3 years ago by Ethan Smith <[email protected]>
virtualenv 16.7.11 appears to have broken our CI by upgrading the
version of pip embedded to so...
We add a special path for %-style string formatting, which previously is compiled by calling a %...
2a332e79e9b6ab4999b3583f18155ccc9e0c0a7a authored over 3 years ago by 97littleleaf11 <[email protected]>4c6c45508bfa06b3ec442ca4f30d59a956272152 authored over 3 years ago by Elisha Hollander <[email protected]>
This PR adds support for compiling functions named _ even when there are multiple functions name...
7edceadf6ef7de2baab498a5d11b794f891854f5 authored over 3 years ago by pranavrajpal <[email protected]>
* Use docstrings in `specialize.py`
* Limit line length of comments and docstrings to 72 charac...
In `CPyArg_ParseStackAndKeywordsSimple`, we don't check if the parser is
initialized, so on the...
Avoid trying to get the fallback type from the type variables if there
aren't 2 elements in the...
aede3aefd75332f3911a43bb4a6a98baacce785a authored over 3 years ago by Taneli Hukkinen <[email protected]>
3bef7b82345bf9c7843e9fd78fd6e7b8408fdb34 authored over 3 years ago by Vanessa Ung <[email protected]>
Currently these mostly segfault.
The main tricky case here is with *args and **kwargs (which ...
5e83bd646c1956adade5fa7b13f9e81b56a88802 authored over 3 years ago by Michael J. Sullivan <[email protected]>
I was originally planning to address this by adding an ARG_POS_ONLY
kind (as a concrete win for...
This PR causes mypy to not show an error if a function named _ is redefined,
as a single under...
Currently the finally path has a hacky pointless branch
on a register that is potentially NULL ...
This makes several improvements to the support for compiling singledispatch that was introduced ...
7d69ce2ccf6bf751d050c3b65354019878d90739 authored over 3 years ago by pranavrajpal <[email protected]>We've been getting rid of the `c_` prefixes.
66cae4b99e585735e3767623991d5f64b8269377 authored over 3 years ago by Jukka Lehtosalo <[email protected]>d569ccc0a751fee993023e9b6a2880d1f67b7e93 authored over 3 years ago by Sebastian Rittau <[email protected]>
beba94c509211947201ece020e8fe513695ecea0 authored over 3 years ago by Kevin Wojniak <[email protected]>
Closes #3379.
612d59a3c2dadda2cff391637b66a0393b479095 authored over 3 years ago by Anmol Takiar <[email protected]>
Accessing an instance attribute through a native class object results in
unexpected behavior at...
24f3ba0ac4ed34f15739c72c96da152890e31182 authored over 3 years ago by Nikita Sobolev <[email protected]>
Part of the motivation here is that I want to make positional-only
arguments be properly reflec...
This is cleaner and more precise and will allow us to add convenience
methods to the class.
(I...
ebc4f10e9a913bcee076052ce1e2b3d1eb028670 authored over 3 years ago by Nikita Sobolev <[email protected]>
This pull request adds a specializer for faster constructing f-string, which
is translated int...
Closes mypyc/mypyc#875
eb1c52514873b27db93ccb8abecb4b4713feb667 authored over 3 years ago by 97littleleaf11 <[email protected]>cdb268506e55e183048cc2b162413a7f1b8d447f authored over 3 years ago by Anton Agestam <[email protected]>
Support things like `isinstance(x, int | str)` in Python 3.10
Closes #9880.
f137f11acc168bb529555030427d91c71ad7ac00 authored over 3 years ago by Jukka Lehtosalo <[email protected]>
In PR #9192 a fast path was created to address the slowness reported
in issue #9169 wherein lar...
Instead of modifying dec.decorators directly, copy it and only modify
the copied version. That ...
Previously it only worked when the target Python version was 3.10. Now type
aliases like these ...
Support the X | Y syntax (PEP 604) in type aliases, casts, type applications
and base classes.
...
This makes specialized `format()` calls faster.
Closes mypyc/mypyc#876.
178df792de7e2d1e06b111bba8e886324cdb23e3 authored over 3 years ago by 97littleleaf11 <[email protected]>This fixes these issues:
* Allow variable-length tuple (tuple[int, ...]) in type aliases
* A...
This PR adds initial support for compiling functions marked with singledispatch by generating IR...
a5a9e1554b0f637ccb2fd9c0d3b0eb17836fc54a authored over 3 years ago by pranavrajpal <[email protected]>
When calling a function that has been registered as an implementation
for a singledispatch func...
This PR adds a str.format specializer which only supports empty brackets. Also, the
detection ...
Closes mypyc/mypyc#835
* Add a branch for str_rpimitive in builtin_len
* Reduce redundant co...
dmypy requires local-partial-types, so without specifying it, we generate
a cache that is usele...
These only worked with the simplified stubs used in tests.
e896ca4a16b0b220c1aa246c787c0d12124d29f8 authored over 3 years ago by Jukka Lehtosalo <[email protected]>
Adds initial support for type checking uses of the singledispatch decorator,
including support...
Fixes #10605
cae5d3c8b5f14d0796914aa6a113473ca3ffc38e authored over 3 years ago by ethframe <[email protected]>I believe this should help with some issues that come up with #10694.
416f57bed76d6a2aca15934c24a850464e6c99ca authored over 3 years ago by Michael J. Sullivan <[email protected]>a8c32c99ba6e8ab80a746e6615b40bcd38c14789 authored over 3 years ago by 97littleleaf11 <[email protected]>
* Run com2ann
* manual fixes (mainly None defaults)
* manual fixes (mainly stringifying ty...
f98f78216ba9d6ab68c8e69c19e9f3c7926c5efe authored over 3 years ago by Shantanu <[email protected]>
Change the type of the first argument of verify (the type that
singledispatch is dispatching on...
Installation instruction example for requests (https://mypy.readthedocs.io/en/stable/getting_sta...
3dcccf221ead4b3143208fc2a1631336d6186e45 authored over 3 years ago by geo7 <[email protected]>
Change the type of the get_method_signature_hook and
get_function_signature_hook plugin hooks t...
SymbolTableNode.node can be None, which means that we may accidentally
passing None to verify, ...
379622de482ec16dd1676ad6d183dcfca5203194 authored over 3 years ago by Shantanu <[email protected]>
48181d26e7575aece8cab61eb866ac6c573dfd76 authored over 3 years ago by Jukka Lehtosalo <[email protected]>
Delete two outdated TODOs.
20babc52a11fd98f5073c13875573269c53ee4d5 authored over 3 years ago by 97littleleaf11 <[email protected]>1fcb71e53f2e08a999e6f393543c64327c596d01 authored over 3 years ago by Henry Schreiner <[email protected]>
The wheel builds were broken. Our CI no longer uses Python 3.5.
3a856cc6738bde4fa988a59c521c63009c338925 authored over 3 years ago by Jukka Lehtosalo <[email protected]>
When using lvalue context to re-infer call to an overloaded function,
the inferred tuple type c...
This adds support for these unary dunders:
* `__neg__`
* `__invert__`
* `__int__`
* `__float...
If we encounter an import of a submodule of a package with installed
stubs, and the submodule d...
When a method is used in a decorator, pass the full name to plugins
through the get_method_hook...
08e6ba888ea8deb81a6ccea0a04ff7a2b3149d56 authored over 3 years ago by Anmol Takiar <[email protected]>
Closes mypyc/mypyc#830
Add dict_setdefault_spec_init_op.
1573336d12ec56454b6a3ed6633acff8bb2c4737 authored over 3 years ago by 97littleleaf11 <[email protected]>This is a quick fix to unblock the 0.910 release.
The type guard type can be unrelated to the...
749dbf092220d992fda5f879210c907e99927a03 authored over 3 years ago by Jukka Lehtosalo <[email protected]>81ad8c309c9cadbd50d784bb251b1aa60f30213f authored over 3 years ago by Jukka Lehtosalo <[email protected]>
Depends on python/typeshed#5669
ac2caced3e2792405c70dcf1a235c3e891f21771 authored over 3 years ago by Sebastian Rittau <[email protected]>2ebdbca3b5afbfa1113f01b583522f4afcc4b3e3 authored over 3 years ago by Ilya Konstantinov <[email protected]>
It was indeed weird that Union[builtins.bool, Literal[True]] wasn't simplified by make_simplifie...
aad58f0aa2610ed5e6306dc17e57fc9086605c52 authored over 3 years ago by Ilya Konstantinov <[email protected]>43862895ec490255a6ec11166dc1c07426f8fd90 authored over 3 years ago by Ilya Konstantinov <[email protected]>
Mypy currently will warn about unreachable code regardless if the code
"should" be type checked...
Co-authored-by: Marius Gedminas <[email protected]>
Co-authored-by: Guido van Rossum <gvanrossum...
If the first build finds missing stub packages, run the build a second
time after installing ty...
There are no tests since our test framework makes it tricky to
write tests for these kinds of s...
Fixes #9615, fixes #9682
Both issue reports hit the faulty cast on L2803. This changes the lo...
b0e36aab1dfc1a4f9df290b4d133d334ff254ecd authored over 3 years ago by Shantanu <[email protected]>Resolves #10648
7f54bd064399ee4e38586c311a2796ff3f255276 authored over 3 years ago by Smart <[email protected]>
Add mypy tests for singledispatch that represent common errors that we
probably want to handle ...
It's now also available for Python 3
d87d468ee80908a865c388a7743c84c1f5c917d7 authored over 3 years ago by Sebastian Rittau <[email protected]>The pallets libraries are now bundled with a `py.typed` file. Suggesting to install these stubs ...
4dd954f2ae3086eea59e2dfbf115af99a76451dc authored over 3 years ago by Sebastian Rittau <[email protected]>Fixes mypyc/mypyc#707.
a9fda34dc68896df0405d8d9d8084148b7917bf5 authored over 3 years ago by 97littleleaf11 <[email protected]>790ab35ca936d04c484d427704d5acb17904012b authored over 3 years ago by Ilya Konstantinov <[email protected]>