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
Fixes #15060
The example in the issue contains another case where an erased type may
legiti...
Followup to #15165
6f28cc3093f97fe3ee4ffdd0b879cffd235ad4c9 authored over 1 year agob1761f4c90e89d5d44e70db377209048aa84c5a3 authored over 1 year ago
This is allegedly causing large performance problems, see 13821
typeshed/8231 had zero hits on ...
9ebe5fd49e4ea85cc9e64db99eef40634b780144 authored over 1 year agoSince the plugin provides superior type checking: https://github.com/python/mypy/pull/13987#issue...
d1987191fe8b066c68f2b80aca9dac9bed6f9768 authored over 1 year ago
Source commit:
https://github.com/python/typeshed/commit/d208d5a83394e9ad1d0dd5d567818c597dfaa28f
17b46935bba496e7e41e08756e35cb0145c56134 authored over 1 year ago
c844270a45f5d82d7d3115f597eb6b60af5688e8 authored over 1 year ago
Related: https://github.com/python/mypy/issues/15024.
dbb72bb92cd45939364312e84271ce4ecad2820b authored over 1 year agoFixes #15018
The fix is quite straightforward: function-scope aliases are not
supported any...
6b1fc865902bf2b845d3c58b6b9973b5a412241f authored over 1 year ago
Fixes https://github.com/hauntsaninja/mypy_primer/issues/80
29cc5614b94d2357794fe5c62c64525fd8087e59 authored over 1 year ago
This PR fixes the
[`FURB121`](https://github.com/dosisod/refurb/blob/master/docs/checks.md#furb...
Adjusting the README to comply with Markdown Linting rules:
- MD032/blanks-around-lists: List...
9cead12caa067bfb36fbe3ad4b41877613cd0343 authored over 1 year ago
This is required when using stubgen in a parallel build system, such as
GNU make.
Fixes #13027 (or at least half of it)
bf6b21d35a4b91c9a34302d39e7992c952e0eac7 authored over 1 year ago
- the library is named "attrs", not "attr"[^1]
- "attrs" could mean a test of Python attributes...
Fixes #12923
assert_type(42, int) ... had issues. #12923 was a bit of a mess as the
OP was o...
Fixes #14915
When there are more than 200 errors to report, mypy "softly" trims the
output ...
Types from `numbers` aren't really supported in any useful way. Make it
more explicit, since th...
Fixes #15110
- Add PYTHONSAFEPATH="true" to call to subprocess in get_search_dirs()
- Check...
Fixes #5349 - Updating Error Messaging for Invalid Exception Type
e4217f260e26b4c76ea182af591b53b8eb6c8cbc authored over 1 year ago97e7f3e8af8ab0c1f00c9c3f3f71e828210dc3a2 authored over 1 year ago
Adding the following documentation updates to MyPy's CONTRIBUTING.md:
- Adding additional step ...
Fixes #15111
Adds tests for:
- AsyncGenerator within an AsyncGenerator
- Unpacking iterabl...
This should fix https://github.com/python/mypy/issues/15082:
If the python version is set to 3....
Fixes #14506
fe8873f2531de0011a1f49846aac8bca214d7eb4 authored almost 2 years ago
Use the `ErrorMessage` class from `message_registry.py` to move the
error messages from `fastpa...
a2b0f18c5791d1110fbafd08a878d99e112d64d4 authored almost 2 years ago
Add CPyImport_ImportFromMany() which imports a module and a tuple of
names, placing them in the...
If errors are ignored, type checking function bodies often can have no
effect. Remove function ...
Propagate additional function flags in TransformVisitor.
Work on #14706.
bdac4bc8c4c2a6242bb1116484684d6dc9c0ff0c authored almost 2 years ago
This PR fixes the
[`FURB145`](https://github.com/dosisod/refurb/blob/master/docs/checks.md#furb...
This was broken by merging a very old PR.
7be0d4b2c5b2266ed10ce45ca2817014e6e3031b authored almost 2 years agoResolves #10915, resolves #9786
See the discussion in #10915. I'm sympathetic to the differen...
0061d6edea433a76d6ea2e34551ca89bfa5291ba authored almost 2 years ago
This is a workaround for correctly detecting the platform when building
mypy with mypyc on the ...
I figured this might be faster and less code.
315b4663068cd570b4979e55538e90e349ed4e5a authored almost 2 years ago
This is a performance optimisation for subtyping between two unions that
are largely the same.
...
Add a test for the code path exercised in #15094
3cca9873d51a5b7b4bf1b68a0b57d0116f522646 authored almost 2 years ago
Fixes `attrs.evolve` signature generation to support the `inst`
parameter being
- a generic at...
084581839b3f39766154aa81e8019bec6cee416e authored almost 2 years ago
Adds a new option , `use_lowercase_builtins()`, to choose whether to
report builtin types (`tup...
Fixes #15041
Related to #14882 and #14017 (the older one is where I added the xfail
test)
Fixes https://github.com/mypyc/mypyc/issues/982
0799a8ab0dc8deed8d2e0ec34b1aab2fe39ebd96 authored almost 2 years agoCo-authored-by: KotlinIsland <[email protected]>
4276308be01ea498d946a79554b4a10b1cf13ccb authored almost 2 years agoFixes #14986
This PR allows any object matching
`_typeshed.SupportsKeysAndGetItem[str, Any]`...
Source commit:
https://github.com/python/typeshed/commit/b0ed50e9392a23e52445b630a808153e0e25...
69c774e6d6fa92aea8f32cd0e045e8a34a0f7215 authored almost 2 years ago
This bundles together a handful of improvements to stubgenc. Each one
has its own commit, but i...
Fixes #15024
1a47b19bd02629157f3e33cd636b4fc2953f33f3 authored almost 2 years agoCloses #14980
11166b73a713052afc7659a1ddb94084ca97c0b7 authored almost 2 years ago
In `cheat_sheep_py3.rst` functions examples, there is one function
example misaligned with to o...
Fixes the error on the last line of this example:
```python
@attrs.define
class A:
x: int
...
A possible solution for https://github.com/python/mypy/issues/14867 (I
just copy everything fro...
The section "Using classes that are generic in stubs but not at runtime"
on the runtime_trouble...
This adds a commit which fixes issue
https://github.com/python/mypy/issues/9655 wherein some ty...
Could help with e.g. https://github.com/matplotlib/matplotlib/pull/24976
e21ddbf3ebe80bc219708a5f69a1b7d0b4e20400 authored almost 2 years ago
(Basic functionality was implemented by @wesleywright in #14870. I added
overload resolution.)
...
Infer `__init__` argument types from the signatures of descriptor
`__set__` methods, if present...
Fixes #14983
bf82b76a2ab2bfb29cab432d25b516e4907ac27e authored almost 2 years agoI added this section in #14973. Fixes #14996
7d2844cd87125abdaeddf54b54f8a3332c5ad8cd authored almost 2 years agoFollowup PR to #14992
a44afe1646be4cd0646e7f9792ad934b29f16d9f authored almost 2 years agoe85f54e527f655fbc34efd5c69f2b9e2be8cf9e9 authored almost 2 years ago
Since the plugin provides superior type checking:
https://github.com/python/mypy/pull/13987#iss...
This is allegedly causing large performance problems, see 13821
typeshed/8231 had zero hits on ...
d8674f3873251f2271c8c8f6e254a5966b21eac5 authored almost 2 years agoac65631991610be8cb7b03280afba4d957eb1baa authored almost 2 years ago
Source commit:
https://github.com/python/typeshed/commit/6fd245d890b1f1fb0a4d9494c668c42b6e96530e
89469ac51aff1eefcd693d87d621577370ddedb4 authored almost 2 years ago
25c06313e6889a1eeefe2340592c15eb1bf10c67 authored almost 2 years ago
Also updated a few links that were pointing to redirects.
Skipped following files:
* XML/S...
da7268c3af04686f70905750c5d58144f6e6d049 authored almost 2 years agoSee #14959
a9a047e8c67a975d29ef6dc62dd6a122057f1b2c authored almost 2 years ago
Everyone can use future annotations now. Also forward references are the
most type hinting popu...
Some of the examples here neither ran nor type checked. Remove mention
and use of deprecated AP...
Fixes #11806
This error message was last changed in #11139 to make it more applicable
to f-s...
I was working on adding some extra checks around type aliases to
stubtest, and realised that so...
I didn't realize `builtins` tags in tests add two of the same file,
rendering the first call of...
I was checking through my previous contributions and noticed I messed up
the logic here. I adde...
When creating generic classes using `attrs`, converters with type vars
are not properly integra...
If the cause for failure is a diff, the traceback isn't helpful and in
fact we've been trying t...
As the number grows starts to need search and wondering at what place to
add a new one. Making ...
Fix narrowing union types that include Self with isinstance (Fixes #14912).
The special case ...
c5ddc36ed92702b4f3ebda091f7a3e5e1e87c2ed authored almost 2 years ago
This PR removes certain `len()` comparisons when it would be faster/more
succinct to do a truth...
Let the multiple inheritance checks consider callable objects as
possible subtypes of usual fun...
6a43e7335428a7d7d44ad5117b02aa1520d7e921 authored almost 2 years ago
802b947fc219dfe212189d1a1b59caca24d78e27 authored almost 2 years ago
354641fc0c42ced958d3b84d0084f622586d6810 authored almost 2 years ago
c29c173df7ddbdf5e62c28367841b116541781f6 authored almost 2 years ago
This implements most of #14924. The only thing it _doesn't_ implement is
verification for overl...
#13323 means that stubtest will currently emit an error if the runtime
is decorated with `@abst...
764ff6f563d0fe45c7012f6c2f1da087696e7275 authored almost 2 years ago
I'm trying to fix this error:
```
float_ops.c:9:15: error: function declaration isn't a protot...
These were undocumented previously.
4e6d68322774d5f7c15d5067613fc851b4640d3e authored almost 2 years ago
Fix undefined behavior due to converting a negative float to an unsigned
integer type. Fix edge...
An optimization to make iterating over dict.keys(), dict.values() and
dict.items() faster cause...
Instead, coerce each tuple item individually. This makes some coercions
between tuple types muc...
Fixes #14889
Fix is straightforward. PEP 544 doesn't say anything about this, but IMO
ignori...
Now, runtime code like
```python
from typing import final
@final
class A: ...
```
W...
e07ccde05f5b6813b9770292cbff6967684994e3 authored almost 2 years agoFixes #14744
fccaab05b9c12a4d85cc05e5e9687751a98620ec authored almost 2 years ago59886d2653fdc50f144b158b38f7b77168ca57b5 authored almost 2 years ago
Fixes #14857. The initial implementation overlooked this statement in
[PEP 681](https://peps.py...
8d59d31903ffc4c2c80cf0a247db6c503954616e authored almost 2 years ago