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

Fix crash on lambda in generic context with generic method in body (#15155)

Fixes #15060

The example in the issue contains another case where an erased type may
legiti...

9f69beaf258b330d7472a12da06ec3074f883c5e authored over 1 year ago
Update hashes in `misc/sync-typeshed.py` following typeshed sync (#15166)

Followup to #15165

6f28cc3093f97fe3ee4ffdd0b879cffd235ad4c9 authored over 1 year ago
Revert use of `ParamSpec` for `functools.wraps`

b1761f4c90e89d5d44e70db377209048aa84c5a3 authored over 1 year ago
Revert sum literal integer change (#13961)

This is allegedly causing large performance problems, see 13821

typeshed/8231 had zero hits on ...

9ebe5fd49e4ea85cc9e64db99eef40634b780144 authored over 1 year ago
Revert typeshed ctypes change

Since the plugin provides superior type checking: https://github.com/python/mypy/pull/13987#issue...

d1987191fe8b066c68f2b80aca9dac9bed6f9768 authored over 1 year ago
Sync typeshed

Source commit:
https://github.com/python/typeshed/commit/d208d5a83394e9ad1d0dd5d567818c597dfaa28f

8b356ffbc65ebe27c175f34425268119ca2bec4b authored over 1 year ago
Fix ctypes plugin (hopefully)

17b46935bba496e7e41e08756e35cb0145c56134 authored over 1 year ago
Remove use of LiteralString in builtins (#13743)

c844270a45f5d82d7d3115f597eb6b60af5688e8 authored over 1 year ago
Clarify usage of callables regarding type object in docs (#15079)

Related: https://github.com/python/mypy/issues/15024.

dbb72bb92cd45939364312e84271ce4ecad2820b authored over 1 year ago
Fix a crash when function-scope recursive alias appears as upper bound (#15159)

Fixes #15018

The fix is quite straightforward: function-scope aliases are not
supported any...

30971699056fa1f84a49790408a4466a2bcc6ab5 authored over 1 year ago
Fix syntax error in mypy primer comment (#15156)

6b1fc865902bf2b845d3c58b6b9973b5a412241f authored over 1 year ago
Improve mypy_primer comment (#15144)

Fixes https://github.com/hauntsaninja/mypy_primer/issues/80

29cc5614b94d2357794fe5c62c64525fd8087e59 authored over 1 year ago
Simplify `isinstance` calls (#15149)

This PR fixes the
[`FURB121`](https://github.com/dosisod/refurb/blob/master/docs/checks.md#furb...

b5914b51304800e82d435310e548547d2b55298c authored over 1 year ago
Improve README formatting (#15143)

Adjusting the README to comply with Markdown Linting rules:

- MD032/blanks-around-lists: List...

9cead12caa067bfb36fbe3ad4b41877613cd0343 authored over 1 year ago
Make stubgen respect MYPY_CACHE_DIR (#14722)

This is required when using stubgen in a parallel build system, such as
GNU make.

09d469f3ea845c682d9be4af6aba889cb5852396 authored over 1 year ago
Use `type` instead of `Type` in errors on newer Python (#15139)

Fixes #13027 (or at least half of it)

bf6b21d35a4b91c9a34302d39e7992c952e0eac7 authored over 1 year ago
Rename attrs tests (#15124)

- the library is named "attrs", not "attr"[^1]
- "attrs" could mean a test of Python attributes...

16b936c15b074db858729ed218248ef623070e03 authored over 1 year ago
Fix assert_type behaviour with Instance last_known_value (#15123)

Fixes #12923

assert_type(42, int) ... had issues. #12923 was a bit of a mess as the
OP was o...

6b326d556e3a34949c363ef1f728abda164a9f24 authored over 1 year ago
Set soft error limit default to -1 (unlimited) (#15138)

Fixes #14915

When there are more than 200 errors to report, mypy "softly" trims the
output ...

bd2a641635d4dd5fe24939287f5be71152d9cd06 authored over 1 year ago
Add explanation if argument type is incompatible because of a "numbers" type (#15137)

Types from `numbers` aren't really supported in any useful way. Make it
more explicit, since th...

0c6e18ae5d96ecab7dd4857f0d99cd1127a9674b authored over 1 year ago
15110: set env var for subprocess, check version in script (#15122)

Fixes #15110

- Add PYTHONSAFEPATH="true" to call to subprocess in get_search_dirs()
- Check...

0dafc470f492b9e3fc6df294582d7b9066b81f45 authored over 1 year ago
Update message about invalid exception type in try (#15131)

Fixes #5349 - Updating Error Messaging for Invalid Exception Type

e4217f260e26b4c76ea182af591b53b8eb6c8cbc authored over 1 year ago
Don't run flake8 twice in CI (#15129)

97e7f3e8af8ab0c1f00c9c3f3f71e828210dc3a2 authored over 1 year ago
Documentation Update to CONTRIBUTING.md (#15130)

Adding the following documentation updates to MyPy's CONTRIBUTING.md:
- Adding additional step ...

00f3913b314994b4b391a2813a839c094482b632 authored over 1 year ago
Add tests for language changes in 3.11 (#15120)

Fixes #15111

Adds tests for:
- AsyncGenerator within an AsyncGenerator
- Unpacking iterabl...

15fbd539b08a99d13c410b4683b13891274091bb authored almost 2 years ago
Use X | Y union syntax in error messages (#15102)

This should fix https://github.com/python/mypy/issues/15082:
If the python version is set to 3....

334daca2c8fd0c183408ed9e2735c070543bbd6d authored almost 2 years ago
Generates error when staticmethod and classmethod decorators are both used (#15118)

Fixes #14506

fe8873f2531de0011a1f49846aac8bca214d7eb4 authored almost 2 years ago
Migrate fastparse to use ErrorMessage class (#14753)

Use the `ErrorMessage` class from `message_registry.py` to move the
error messages from `fastpa...

9ce347083ec5810ad23f8727a111619bcb7029a5 authored almost 2 years ago
Fix pyinfo for Python 3.12 changes (#15103)

a2b0f18c5791d1110fbafd08a878d99e112d64d4 authored almost 2 years ago
[mypyc] Switch to table-driven imports for smaller IR (#14917)

Add CPyImport_ImportFromMany() which imports a module and a tuple of
names, placing them in the...

ba350267d43af89dd2ad5b5c1adb22b80d3868a0 authored almost 2 years ago
Don't type check most function bodies if ignoring errors (#14150)

If errors are ignored, type checking function bodies often can have no
effect. Remove function ...

aee983e61670fb091693d81c3ab16a2fb25863fe authored almost 2 years ago
Fix nested async functions when using TypeVar value restriction (#14705)

Propagate additional function flags in TransformVisitor.

Work on #14706.

bdac4bc8c4c2a6242bb1116484684d6dc9c0ff0c authored almost 2 years ago
Replace `x[:]` with `x.copy()` (#14949)

This PR fixes the
[`FURB145`](https://github.com/dosisod/refurb/blob/master/docs/checks.md#furb...

186432da8d4da69730106f3dbeab8bef71fd68f5 authored almost 2 years ago
Fix black (#15112)

This was broken by merging a very old PR.

7be0d4b2c5b2266ed10ce45ca2817014e6e3031b authored almost 2 years ago
Allow narrowing enum values using == (#11521)

Resolves #10915, resolves #9786

See the discussion in #10915. I'm sympathetic to the differen...

0061d6edea433a76d6ea2e34551ca89bfa5291ba authored almost 2 years ago
Fix sys.platform when cross-compiling with emscripten (#14888)

This is a workaround for correctly detecting the platform when building
mypy with mypyc on the ...

31708f33ae26d3fad92c7a2887bd60b07b241e50 authored almost 2 years ago
Use dict keys for order-preserving dedupes instead of set + list (#15105)

I figured this might be faster and less code.

315b4663068cd570b4979e55538e90e349ed4e5a authored almost 2 years ago
Fix performance in union subtyping (#15104)

This is a performance optimisation for subtyping between two unions that
are largely the same.
...

bd6ce237f62366f156f4af074e398d761fb41359 authored almost 2 years ago
Regression test for make_simplified_union truthiness (#15098)

Add a test for the code path exercised in #15094

3cca9873d51a5b7b4bf1b68a0b57d0116f522646 authored almost 2 years ago
attrs.evolve: support generics and unions (#15050)

Fixes `attrs.evolve` signature generation to support the `inst`
parameter being
- a generic at...

2a4c473aa809f314c489c9f0bde0ae47842a2f96 authored almost 2 years ago
Bump version to 1.4 in preparation for 1.3 release (#15077)

084581839b3f39766154aa81e8019bec6cee416e authored almost 2 years ago
Make messages use builtin types instead of typing's types (#15070)

Adds a new option , `use_lowercase_builtins()`, to choose whether to
report builtin types (`tup...

768ba66af4c90c14c19275896067a4e4fe6f2f46 authored almost 2 years ago
Fix bounded self types in override incompatibility checking (#15045)

Fixes #15041

Related to #14882 and #14017 (the older one is where I added the xfail
test)

3d9661c91d5dfaf3ae0d3ca5624867cdf449da77 authored almost 2 years ago
[mypyc] Fix unions of bools and ints (#15066)

Fixes https://github.com/mypyc/mypyc/issues/982

0799a8ab0dc8deed8d2e0ec34b1aab2fe39ebd96 authored almost 2 years ago
(🎁) update black to 23.3.0 (#15059)

Co-authored-by: KotlinIsland <[email protected]>

4276308be01ea498d946a79554b4a10b1cf13ccb authored almost 2 years ago
Allow objects matching `SupportsKeysAndGetItem` to be unpacked (#14990)

Fixes #14986

This PR allows any object matching
`_typeshed.SupportsKeysAndGetItem[str, Any]`...

14493660eadf35553a3cecb746704b58a401c68d authored almost 2 years ago
Sync typeshed (#15055)

Source commit:

https://github.com/python/typeshed/commit/b0ed50e9392a23e52445b630a808153e0e25...

69c774e6d6fa92aea8f32cd0e045e8a34a0f7215 authored almost 2 years ago
Improvements to stubgenc (#14564)

This bundles together a handful of improvements to stubgenc. Each one
has its own commit, but i...

8f94d9ac672af30ce4eb711c6be442b7ac67d817 authored almost 2 years ago
Fix error for callback protocol matching against callable type object (#15042)

Fixes #15024

1a47b19bd02629157f3e33cd636b4fc2953f33f3 authored almost 2 years ago
[stubgen] Add `@functools.cached_property` support (#14981)

Closes #14980

11166b73a713052afc7659a1ddb94084ca97c0b7 authored almost 2 years ago
Fix alignment of cheat sheet example (#15039)

In `cheat_sheep_py3.rst` functions examples, there is one function
example misaligned with to o...

5005428f6bf143d4f8d75b7cb9dd258d00e8ef14 authored almost 2 years ago
Fix attrs.evolve on bound TypeVar (#15022)

Fixes the error on the last line of this example:
```python
@attrs.define
class A:
x: int
...

cc7b062026311287c91b226960ee0ad2e447a7ea authored almost 2 years ago
Add negative subtype caches (#14884)

A possible solution for https://github.com/python/mypy/issues/14867 (I
just copy everything fro...

b43e0d34247a6d1b3b9d9094d184bbfcb9808bb9 authored almost 2 years ago
Clarify "Using types...but not at runtime" docs (#15029)

The section "Using classes that are generic in stubs but not at runtime"
on the runtime_trouble...

d328c2227c40dd3f6ad0b010724ef0c7d49da651 authored almost 2 years ago
Fix disappearing errors when re-running dmypy check (#14835)

This adds a commit which fixes issue
https://github.com/python/mypy/issues/9655 wherein some ty...

a9ee618f3a941098b24156eb499db5684fcfc261 authored almost 2 years ago
stubtest: improve allowlist documentation (#15008)

Could help with e.g. https://github.com/matplotlib/matplotlib/pull/24976

e21ddbf3ebe80bc219708a5f69a1b7d0b4e20400 authored almost 2 years ago
[dataclass_transform] support implicit default for "init" parameter in field specifiers (#15010)

(Basic functionality was implemented by @wesleywright in #14870. I added
overload resolution.)
...

0f09be472cad7aa06ca4af9dd73aca6b87450d84 authored almost 2 years ago
Support descriptors in dataclass transform (#15006)

Infer `__init__` argument types from the signatures of descriptor
`__set__` methods, if present...

16bd3112d070a80b749e2f0e419d6fe321443e65 authored almost 2 years ago
Fix stubtest false positives with TypedDicts at runtime (#14984)

Fixes #14983

bf82b76a2ab2bfb29cab432d25b516e4907ac27e authored almost 2 years ago
Also mention overloads in async iterator documentation (#14998)

I added this section in #14973. Fixes #14996

7d2844cd87125abdaeddf54b54f8a3332c5ad8cd authored almost 2 years ago
Update commit hashes in `misc/sync-typeshed.py` following typeshed sync (#14994)

Followup PR to #14992

a44afe1646be4cd0646e7f9792ad934b29f16d9f authored almost 2 years ago
Revert use of `ParamSpec` for `functools.wraps`

e85f54e527f655fbc34efd5c69f2b9e2be8cf9e9 authored almost 2 years ago
Revert typeshed ctypes change (#14128)

Since the plugin provides superior type checking:
https://github.com/python/mypy/pull/13987#iss...

e437cdf9ca988fbef910689ed9e684ff28eeef29 authored almost 2 years ago
Revert sum literal integer change (#13961)

This is allegedly causing large performance problems, see 13821

typeshed/8231 had zero hits on ...

d8674f3873251f2271c8c8f6e254a5966b21eac5 authored almost 2 years ago
Remove use of LiteralString in builtins (#13743)

ac65631991610be8cb7b03280afba4d957eb1baa authored almost 2 years ago
Sync typeshed

Source commit:
https://github.com/python/typeshed/commit/6fd245d890b1f1fb0a4d9494c668c42b6e96530e

5a577644ec635cab81da0563f681579171ff0b86 authored almost 2 years ago
Fix CI

89469ac51aff1eefcd693d87d621577370ddedb4 authored almost 2 years ago
Modernize stubgen

25c06313e6889a1eeefe2340592c15eb1bf10c67 authored almost 2 years ago
Convert insecure links to use HTTPS (#14974)

Also updated a few links that were pointing to redirects.

Skipped following files:

* XML/S...

da7268c3af04686f70905750c5d58144f6e6d049 authored almost 2 years ago
Add documentation for bytes formatting error code (#14971)

See #14959

a9a047e8c67a975d29ef6dc62dd6a122057f1b2c authored almost 2 years ago
Improvements to cheat sheet (#14972)

Everyone can use future annotations now. Also forward references are the
most type hinting popu...

10ae9120fe2986dd3ddecc047c692327e2e82e67 authored almost 2 years ago
Improve async documentation (#14973)

Some of the examples here neither ran nor type checked. Remove mention
and use of deprecated AP...

7c49fa66e9069c523c9c92453978bda3ecc835e3 authored almost 2 years ago
Improve bytes formatting error (#14959)

Fixes #11806

This error message was last changed in #11139 to make it more applicable
to f-s...

ddf0c052d4fe74519f098a454d34718ed10a3d3b authored almost 2 years ago
Make some stubtest tests less verbose (#14961)

I was working on adding some extra checks around type aliases to
stubtest, and realised that so...

2e75cbaa8e5c0fb8aa3548d5c7c8ccfd00131057 authored almost 2 years ago
Check for duplicated files in tests (#14960)

I didn't realize `builtins` tags in tests add two of the same file,
rendering the first call of...

c517b86b9ba7487e7758f187cf31478e7aeaad47 authored almost 2 years ago
Check typeguard validity for staticmethods (#14953)

I was checking through my previous contributions and noticed I messed up
the logic here. I adde...

c170056213e10dc58e260e319fb714987f94abf2 authored almost 2 years ago
Add support for converters with TypeVars on generic attrs classes (#14908)

When creating generic classes using `attrs`, converters with type vars
are not properly integra...

3f35ebbb531ee04aa4b130c6574433b0943400e3 authored almost 2 years ago
Fix test-data diffs not to produce traceback (#14549)

If the cause for failure is a diff, the traceback isn't helpful and in
fact we've been trying t...

11c2c6d73a849c3852a48f00212cd0e6688a0d9c authored almost 2 years ago
[minor] sort tox testenvs to ease finding one (#14904)

As the number grows starts to need search and wondering at what place to
add a new one. Making ...

5c459d27492705b91d8293a8a13a8c0053d9c8d5 authored almost 2 years ago
Fix narrowing union types that include Self with isinstance (#14923)

Fix narrowing union types that include Self with isinstance (Fixes #14912).

The special case ...

c5ddc36ed92702b4f3ebda091f7a3e5e1e87c2ed authored almost 2 years ago
Simplify `len()` comparisons (#14907)

This PR removes certain `len()` comparisons when it would be faster/more
succinct to do a truth...

46ab0f8f395ea7705ac6b01c0aaf3cf0a107a851 authored almost 2 years ago
Multiple inheritance considers callable objects as subtypes of functions (#14855)

Let the multiple inheritance checks consider callable objects as
possible subtypes of usual fun...

1dd26a319f79222a6b297af9538f3f4f37384323 authored almost 2 years ago
Fix typo in stubtest docs (#14947)

6a43e7335428a7d7d44ad5117b02aa1520d7e921 authored almost 2 years ago
explanatory comment

802b947fc219dfe212189d1a1b59caca24d78e27 authored almost 2 years ago
[dataclass_transform] fix deserialization for frozen_default

354641fc0c42ced958d3b84d0084f622586d6810 authored almost 2 years ago
better testcase name

c29c173df7ddbdf5e62c28367841b116541781f6 authored almost 2 years ago
Stubtest: verify stub methods or properties are decorated with `@final` if they are decorated with `@final` at runtime (#14951)

This implements most of #14924. The only thing it _doesn't_ implement is
verification for overl...

01a088b954ec9a0f351f4e9e9749896df8193830 authored almost 2 years ago
Stubtest: check that the stub is abstract if the runtime is, even when the stub is an overloaded method (#14955)

#13323 means that stubtest will currently emit an error if the runtime
is decorated with `@abst...

2c6e43e1b5aa22ef5296ff72eb6f5deffa9b8b24 authored almost 2 years ago
Bump version to 1.3.0+dev (#14948)

764ff6f563d0fe45c7012f6c2f1da087696e7275 authored almost 2 years ago
[mypyc] Be stricter about function prototypes (#14942)

I'm trying to fix this error:
```
float_ops.c:9:15: error: function declaration isn't a protot...

bfa9eacedb0554e1a6fe9245dbd5ccdbbc555fae authored almost 2 years ago
[mypyc] Document native floats and integers (#14927)

These were undocumented previously.

4e6d68322774d5f7c15d5067613fc851b4640d3e authored almost 2 years ago
[mypyc] Fixes to float to int conversion (#14936)

Fix undefined behavior due to converting a negative float to an unsigned
integer type. Fix edge...

aa2679b6b0bbbffcb454081a81346c0a82804e52 authored almost 2 years ago
[mypyc] Support iterating over a TypedDict (#14747)

An optimization to make iterating over dict.keys(), dict.values() and
dict.items() faster cause...

9944d5fc6ae29a862bfab980a42a9bfae89ee5c0 authored almost 2 years ago
[mypyc] Avoid boxing/unboxing when coercing between tuple types (#14899)

Instead, coerce each tuple item individually. This makes some coercions
between tuple types muc...

1a8ea6187474fcc5896cf4b7f47074673e07ad42 authored almost 2 years ago
Fix crash on class-level import in protocol definition (#14926)

Fixes #14889

Fix is straightforward. PEP 544 doesn't say anything about this, but IMO
ignori...

4a54894c390fae02fed44c4241a7c7d6ef668dc0 authored almost 2 years ago
[stubtest] Respect `@final` runtime decorator, enforce it in stubs (#14922)

Now, runtime code like

```python
from typing import final

@final
class A: ...
```

W...

e07ccde05f5b6813b9770292cbff6967684994e3 authored almost 2 years ago
Fix crash on single item union of alias (#14876)

Fixes #14744

fccaab05b9c12a4d85cc05e5e9687751a98620ec authored almost 2 years ago
Add better error checking to misc/convert-cache.py (#14909)

59886d2653fdc50f144b158b38f7b77168ca57b5 authored almost 2 years ago
[dataclass_transform] fix frozen behavior for base classes with direct metaclasses (#14878)

Fixes #14857. The initial implementation overlooked this statement in
[PEP 681](https://peps.py...

a6b5b1e54a557503e15d6449b417a05d72d55158 authored almost 2 years ago
Update commit hashes in `sync-typeshed.py` following latest typeshed sync

8d59d31903ffc4c2c80cf0a247db6c503954616e authored almost 2 years ago