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

Typeshed cherry-pick: Ignore mypy errors in Python 2 builtins and typing (#7894) (#12826)

From python/typeshed#7894.

37fb21afe937be9da98446557244f3de5424ebf8 authored over 2 years ago by Jukka Lehtosalo <[email protected]>
checkexpr: cache type of container literals when possible (#12707)

When a container (list, set, tuple, or dict) literal expression is
used as an argument to an ov...

1b7e33f7ef4105c7ae495085ec52e15f1fc52c5d authored over 2 years ago by Hugues <[email protected]>
Make pybind11 test fixture fully self-contained (#12722)

Co-authored-by: Keller Fabian Rudolf (CC-AD/EYC3) <[email protected]>

f7e94ee94c2917fb8e522f16bea226b9d8b8d844 authored over 2 years ago by Fabian Keller <[email protected]>
speedup typechecking of nested if expressions (#12700)

Deeply nested if/else expressions have a worst-case exponential behavior.

This will for insta...

e93be734f4ca51f88f0b46e5c089014e712e1d11 authored over 2 years ago by Hugues <[email protected]>
Fix crash on type alias definition inside dataclass declaration (#12792)

Skip processing a type alias node and generate an error.

Fixes #12544.

e612e440103ec7abdc40d0e41115701362abad21 authored over 2 years ago by Alex Waygood <[email protected]>
Avoid crashing on invalid python executables (#12812)

When an invalid python executable is passed to mypy, show an error
message instead of crashing.

6c2690e4af5e12d68a5b91f7c9117f783e528277 authored over 2 years ago by pranavrajpal <[email protected]>
Skip tests that depend on lxml if not installed (#12813)

Detect if lxml is importable in the test suite, if it is not, then skip the report tests which
...

7f4f5b87631dbf4746f81d81e3ccf86bac5901b3 authored over 2 years ago by Ethan Smith <[email protected]>
[mypyc] Borrow operands of several primitives (#12810)

Borrow an operand such as `x.y` (attribute of a native class) in various contexts
when it's sa...

f71dba7526b3f5244faaa210302fc20269691056 authored over 2 years ago by Jukka Lehtosalo <[email protected]>
Update version to 0.970+dev (#12808)

8e7e81759d3e43199bb0dced94f55157b72b2a49 authored over 2 years ago by Jukka Lehtosalo <[email protected]>
Fix namedtuple crash in unannotated function (#12804)

Fixes #11121.

8dac2210f5afedee1c45c6293f20bf9b5c5ec179 authored over 2 years ago by Jukka Lehtosalo <[email protected]>
[mypyc] Borrow references during chained attribute access (#12805)

If we have multiple native attribute access operations in succession, we
can borrow the tempora...

74cfa3d46ae6a9c0033bf95d88462619bc3bc044 authored over 2 years ago by Jukka Lehtosalo <[email protected]>
[mypyc] Detect always defined attributes (#12600)

Use static analysis to find attributes that are always defined. Always defined
attributes don't...

7bd6fdd326b6a06795edb46a5c74fc5cdeb87cc9 authored over 2 years ago by Jukka Lehtosalo <[email protected]>
Fix nested namedtuple crash in incremental mode (#12803)

Make sure the fullname of a named tuple defined within a method matches
the nesting of the defi...

18a510768bdf552248447d35d15f8e48b1aef53d authored over 2 years ago by Jukka Lehtosalo <[email protected]>
Add dataclass InitVar test case (#12798)

This test case cover a recent change in functionality:
if an attribute is defined as an InitVar...

85c21599cae51318344c23eecdfec6c3a2a9557a authored over 2 years ago by Jukka Lehtosalo <[email protected]>
Typeshed cherry-picks: gettext and sqlite3 fixes (#12797)

* gettext: Make GNUTranslations.CONTEXT not final (python/typeshed#7841)
* sqlite3: Avoid optio...

e6bbf5f5e44854e1152ab9ddb46daa2608cf4076 authored over 2 years ago by Jukka Lehtosalo <[email protected]>
Update link in the readme and setup (#12788)

3b7468ea518ef961d75597d52b183579b0fd83db authored over 2 years ago by Max Jones <[email protected]>
Add test case for fixed generic-dataclass crash (#12791)

Adds a test case for a crash that was fixed by #12762. Closes #12527.

613756bd7e7a41ad14f9a6045da04cfc4612c032 authored over 2 years ago by Alex Waygood <[email protected]>
Add test case for fixed dataclass-in-function crash (#12793)

Closes #8703, which is a crash that was fixed by #12762

17aec677e44da4488908680b90e0c145bff67d43 authored over 2 years ago by Alex Waygood <[email protected]>
Add test case for fixed dataclass-classmethod crash (#12794)

e63501c7a11abc54684bdd59872eb3b092b865ae authored over 2 years ago by Alex Waygood <[email protected]>
Sync typeshed (#12766)

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

7fbf4deb845d6041700d1addc6eaa2097560f0f3 authored over 2 years ago by Shantanu <[email protected]>
Fix forward references and generic inheritance in attrs classes (#12772)

Move the attrs plugin to a later pass, so that we won't have placeholders. Fix
various issues r...

50a653e0714e303178c890854b9074fc030907f0 authored over 2 years ago by Jukka Lehtosalo <[email protected]>
[mypyc] Fix TypeError in lambda argument to overloaded function (#12780)

Previously we could export an invalid type for a lambda passed to an
overloaded function. We fi...

5ceaf3d7ec67a9bdee78d656e24dc9e25051759c authored over 2 years ago by Jukka Lehtosalo <[email protected]>
Fix crash related to functools.total_ordering and forward reference (#12767)

Run the plugin in a later pass to avoid placeholder nodes.

Fixes #11728.

8faf44ad44f19c2dcf3f31f12eed5e58494fc3a3 authored over 2 years ago by Jukka Lehtosalo <[email protected]>
Running dataclass transform in a later pass to fix crashes (#12762)

The dataclass plugin could crash if it encountered a placeholder. Fix the issue by
running the ...

03901ef657daf6f477e6fe933c42ac270cf5034b authored over 2 years ago by Jukka Lehtosalo <[email protected]>
Make ValuePattern non-exhaustive (#12751)

Changes behaviour of PatternChecker so that ValuePattern does not cover
the entire (non-literal...

e1c03ab0f37495ef4072892778ab126d04860814 authored over 2 years ago by Štěpán Horáček <[email protected]>
Add documentation for -xfail tests (#12750)

612074f05ba5d65e016c031dc94b13f962d9c6b4 authored over 2 years ago by 97littleleaf11 <[email protected]>
Add error when making abstractmethod final (#12743)

Fixes #12164

f28bf11496b14e5b6a4610438b4a6582fbd0d3c1 authored over 2 years ago by Tomoki Nakagawa <[email protected]>
Fixes generic inference in functions with `TypeGuard` (#11797)

Fixes #11780, fixes #11428

fb11c98e3aa8931104ac9f4618c1342c045d999c authored over 2 years ago by Nikita Sobolev <[email protected]>
Ensure instances of `CallableType` can always be hashed (#12741)

49d5cc907c391b4bcf52f9966f008f80badf12ab authored over 2 years ago by Alex Waygood <[email protected]>
Add a class attribute hook to the plugin system (#9881)

This adds a get_class_attribute_hook to plugins to modify attributes on classes (as opposed to t...

23e2a51e05ce38aa765fe67ab1507836227b301b authored over 2 years ago by Danny Weinberg <[email protected]>
Add info about classes and types to 'getting started' docs (#6557)

Co-authored-by: 97littleleaf11 <[email protected]>
Co-authored-by: Jingch...

91e890fe308e7b9c8ab969a4831a4ff13fbc0aa3 authored over 2 years ago by Michael Lee <[email protected]>
Add more precise error message for Callable annotation (#12518)

Adds a more precise error message for a Callable annotation, if the
option --disallow-any-gener...

269adee09330f6f1836b0ae13e20450c9f708c2a authored over 2 years ago by frerikandriessen <[email protected]>
Fix TypeError with enable-incomplete-features flag (#12726)

4f07c79aea0fef61ab649d6acedf01186f1054eb authored over 2 years ago by Marc Mueller <[email protected]>
Fix crash when using decorator in class scope (#12724)

Fixes #12474

4746519effeafc64da7687af8fe1685d44545219 authored over 2 years ago by dzcode <[email protected]>
Add check if python_version was parsed as float in pyproject.toml (#12558)

Fixes #12108

Co-authored-by: Marcel-ICMC <[email protected]>
Co-authored-by: Shantanu <1262...

9f8b814fc5b3bb8daf0ef04aca3dfd1fb056bc8b authored over 2 years ago by Marcel Otoboni <[email protected]>
mypyc: run pyupgrade (#12708)

Re-attempt of #10741
Ran: `pyupgrade --py36-plus $(fd -e py) --keep-runtime-typing`
I mostly o...

ad177f99fd3322072e389a1a7432ee7b15c84472 authored over 2 years ago by Shantanu <[email protected]>
mypy: use more f-strings (#12714)

Done largely using https://github.com/ikamensh/flynt
I went over this pretty closely since I wa...

3c1a762965dff65fd96817e9fef671be7377b287 authored over 2 years ago by Shantanu <[email protected]>
mypy: run pyupgrade (#12711)

Re-attempt of #10741
Ran: `pyupgrade --py36-plus $(fd -e py) --keep-runtime-typing`
I mostly o...

fc335cb16315964b923eb1927e3aad1516891c28 authored over 2 years ago by Shantanu <[email protected]>
Mention no_type_check in docs (#12713)

Co-authored by: @chrisbeardy

3c46b818237aa8e0e06f33a74a752921346f5c5a authored over 2 years ago by Shantanu <[email protected]>
Fix missing NoReturn annotations and incorrect try placements (#12705)

9a2f729856de6d16c9b59432e6ef4d2790033d4d authored over 2 years ago by Jelle Zijlstra <[email protected]>
checkexpr: speedup typechecking of container literals with tuple entries (#12706)

`fast_dict_type` and `fast_container_type` only allowed Instance but not Tuple of Instances
whi...

7a2ad43431c182cf01a4b9bf73a3bea8e3fac9aa authored over 2 years ago by Hugues <[email protected]>
misc: run pyupgrade (#12709)

Re-attempt of #10741
Ran: `pyupgrade --py36-plus $(fd -e py) --keep-runtime-typing`
I mostly o...

57e57fa3e8281b0906daf0e0b2e5ee23e19d32bf authored over 2 years ago by Shantanu <[email protected]>
mypy/test: run pyupgrade (#12710)

Re-attempt of #10741
Ran: `pyupgrade --py36-plus $(fd -e py) --keep-runtime-typing`
I mostly o...

1662fe8142b6b115bb8da255b1a02bff9e8b7868 authored over 2 years ago by Shantanu <[email protected]>
checkexpr: speedup argument count check (#12703)

Replace List with Dict to avoid O(n**2) behavior in `check_for_extra_actual_arguments`

This m...

a56ebec8bdc1f22c7bf801653f61c9963dd3fc90 authored over 2 years ago by Hugues <[email protected]>
Use callback protocol instead of mypy_extensions (#12701)

dd6d78615455fdd9895cff1691f2de6bb2893a48 authored over 2 years ago by Shantanu <[email protected]>
fix: dead link in readme (#12702)

`introduction.rst` has moved into `index.rst` in #12348.

33dbbd2cde45fe688a716f5d10e51d1bd6a0b096 authored over 2 years ago by eggplants <[email protected]>
cleanups after recent refactor of error filtering (#12699)

ce6d2433fdb9254dac5523825ab8fb310eace371 authored over 2 years ago by Hugues <[email protected]>
Use tuple[object, ...] and dict[str, object] as upper bounds for ParamSpec.args and ParamSpec.kwargs (#12668)

Mypy thought that a variable annotated with P.args is not iterable, and
that a variable annota...

c6cf7cd3dac90dce0be5bf888f530f2eee1534e7 authored over 2 years ago by Alex Waygood <[email protected]>
introduce per-file timing-stats (#12639)

When profiling mypy over a large codebase, it can be useful
to know which files are slowest to ...

d48d548ca5945897c4cbfa9929c0e22e6a4ec9c8 authored over 2 years ago by Hugues <[email protected]>
Implement basic typevartuple constraints/inference (#12688)

Implements basic inference for TypeVarTuple along with various check tests
verifying uses of T...

d64efcd555fc7782592c213472cfa77bfcc2f11c authored over 2 years ago by jhance <[email protected]>
errors: speedup for large error counts and improve error filtering (#12631)

* errors: speedup for large error counts

We have a legacy codebase with many errors across ma...

a3abd3644c5f2c84d2fa65fb621327a6c6a0e695 authored over 2 years ago by Hugues <[email protected]>
Remove most mentions of type comments from docs (#12683)

3460717a11576d84b5f83cd62282480416c240b2 authored over 2 years ago by Shantanu <[email protected]>
Various documentation updates (mostly about error codes) (#12680)

Document some additional error codes and some general doc updates for
the 0.950 release.

ee78afe325800f9266ccc0d143b49b8c0b29d8a3 authored over 2 years ago by Jukka Lehtosalo <[email protected]>
Fix types of inherited attributes in generic dataclasses (#12656)

Fixes #12633.

cb6581a8f1f41bf784eebb6a1d2c8a32fb9b43f0 authored over 2 years ago by Jukka Lehtosalo <[email protected]>
Sync typeshed (#12663)

* Sync typeshed

Source commit:
https://github.com/python/typeshed/commit/5dad506bf20ed5b3ddf...

40bbfb5f2539f6fc3ea8c9b4de6b62d167bb003f authored over 2 years ago by Shantanu <[email protected]>
Fix spelling of "GitHub" in error message (#12655)

d1c061689a330a4fa993f3cadf5cd8bc06756698 authored over 2 years ago by Ikko Ashimine <[email protected]>
Attempt to fix issue with ParamSpec serialization (#12654)

I've seen crashes like this, which might be caused by not
fixing up some FakeInfos:

```
F...

07ea0f612ea2e755cc403b1b11e8ef058a59e4fe authored over 2 years ago by Jukka Lehtosalo <[email protected]>
Add test case for fixed bug regarding nested generic classes (#12652)

Closes #5551 (the bug in that issue was fixed by #12590)

09dbdf6c1020aac533e0a7e71eeb97f1f1dd00f9 authored over 2 years ago by Alex Waygood <[email protected]>
Add regression test for recently fixed `deque.copy()` bug (#12648)

6eac2403f68e33e317c9f17b434d322291e60543 authored over 2 years ago by Alex Waygood <[email protected]>
Update typed_ast types for build (#12638)

9477bd8965e4bbfbb754b7fd2076e1dbe1e26432 authored over 2 years ago by Ethan Smith <[email protected]>
Fix slots and deleted attributes in incremental mode (#12645)

They weren't serialized before. Manually written serialization
code is a pain to keep up-to-date.

00a981518fe1a5ee0a26cf110fcc8bb9649d487e authored over 2 years ago by Jukka Lehtosalo <[email protected]>
Add TypeVarTupleType type node (#12632)

This adds the TypeVarTupleType type node and basic semanal/glue.

Type checking involving it w...

a16c414809714c2872ee9a063c28cde6d4398021 authored over 2 years ago by jhance <[email protected]>
Fix typos (#12635)

Improve docs and fix typos

c56046c5d963b501b69cb76221189aa4cf5ccbac authored over 2 years ago by 97littleleaf11 <[email protected]>
Add TypeVarTupleExpr node (#12481)

This adds minimal support for a TypeVarTupleExpr node, gated behind the
flag to enable incomple...

50213b520b131fc1dd037dfcc1938beba1f4e177 authored over 2 years ago by jhance <[email protected]>
make_simplified_union: simpler and faster (#12630)

Recent attempts at speedup introduced some convoluted logic that both
reduced accuracy and caus...

8b1a8109796c0a32d02de147d3371d381593fbe0 authored over 2 years ago by Hugues <[email protected]>
Add overlapping type variables test case (#12623)

This was originally written by @A5rocks in #11657.

Related to #12590.

0bcca591b49cbc9349d55ba4d38b85f9bc222566 authored over 2 years ago by Jukka Lehtosalo <[email protected]>
Add test case for recently fixed `enumerate` regression (#12627)

cf146f4b5a578597ea5d81a31476fbf5b6a2ef62 authored over 2 years ago by Alex Waygood <[email protected]>
Use class name as namespace for type variables (#12590)

This avoids confusion between type variables of two classes, which can
happen at least in some ...

20b0b9b460cd11a4755f70ae08823fa6a8f5fbd4 authored over 2 years ago by Jukka Lehtosalo <[email protected]>
Fix nested overload merging (#12607)

Closes #12606

cf6a48c865cc5aff23b08e651f41e1bf7b397f98 authored over 2 years ago by Marc Mueller <[email protected]>
stubtest: error if type alias doesn't exist at runtime (#12608)

Co-authored-by: hauntsaninja <>
Co-authored-by: Shantanu <[email protected]...

9e9de71cc7d896829f503f6a35171d906eeef5da authored over 2 years ago by Alex Waygood <[email protected]>
more enum-related speedups (#12032)

As a followup to #9394 address a few more O(n**2) behaviors
caused by decomposing enums into un...

9cab2964a186d7e71567a1528fcc956f9eecebac authored over 2 years ago by Hugues <[email protected]>
Fix type context for assert_type() (#12612)

Noticed in python/typeshed#7655 that it was incorrectly inferring list[Any]
in all cases. This ...

f501cf649d7976077a7196e3548d773d67340a8c authored over 2 years ago by Jelle Zijlstra <[email protected]>
Support typing_extensions.overload (#12602)

This always existed in typing_extensions, but was an alias for
typing.overload. With python/typ...

0df8cf532918f888610a5afd7bb88192712de984 authored over 2 years ago by Jelle Zijlstra <[email protected]>
Docs: Use PEP 585 syntax in "The type of class objects" (#12516)

10ba5c1aa14e01be1cfacb322136e22751617d26 authored over 2 years ago by Alex Waygood <[email protected]>
Sync typeshed (#12596)

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

ce858a6a0c85206ff877faf702293a9b67fae750 authored over 2 years ago by Shantanu <[email protected]>
Add support for assert_type (#12584)

See python/cpython#30843.

The implementation mostly follows that of cast(). It relies on
`my...

875774769922c11094541eec20bd85bb1b87a70c authored over 2 years ago by Jelle Zijlstra <[email protected]>
Fix propagated Any constraint (#12548)

Fixes #12542.

This allows parameters to constrain to Any.

44993e6a18f852a9296786267ecf26ea730b4f31 authored over 2 years ago by EXPLOSION <[email protected]>
Change install from git link in README to https (#12581)

GitHub has dropped support for the unauthenticated git protocol. See
https://github.blog/2021-0...

0c6b29073b2bf7439b9efbb958c403574111ac15 authored over 2 years ago by Vincent Vanlaer <[email protected]>
Update version to 0.960+dev (#12578)

7cc138822cd348be223d298740dbd7194dfa9596 authored over 2 years ago by Jukka Lehtosalo <[email protected]>
Recognise LiteralString as str (#12559)

Linking #12554

Co-authored-by: hauntsaninja <>

f8ca2332eca0f242a3b1d1b99e795c790b044138 authored over 2 years ago by Shantanu <[email protected]>
Typeshed cherry-pick: Drop some literal types from argparse (add_argument) (#7614) (#12576)

From python/typeshed#7614.

1cccb0b9d95ea01e54efe8932b2f12aabf7eec31 authored over 2 years ago by Jukka Lehtosalo <[email protected]>
Fix Stubgen's behavior for Instance Variables in C extensions (#12524)

It is not necessary for instance variables to have the fget attrbute
(e.g. instance variable in...

74df7fb1172993af3b2456765fb8368481ef0ab9 authored almost 3 years ago by Shubham SInghal <[email protected]>
Add tests for decorating ParamSpec (#12555)

6a24e1de5beae5d15ca997b3a4fcb994d26c705a authored almost 3 years ago by Akuli <[email protected]>
README.md: avoid horizontal scrollbar in code snippet (#12551)

965c6c975441e35612d6c9351dee8a2e0c9bb4a1 authored almost 3 years ago by Géry Ogam <[email protected]>
Fix a documentation error (issubtype instead of issubclass) (#12552)

588545f501ab4542cc2e70c64f2630b2786c1dbe authored almost 3 years ago by Géry Ogam <[email protected]>
Fix a documentation error (KeysView instead of ItemsView) (#12549)

92b1f566c3d4d07962d20223d255dc66265c0dbb authored almost 3 years ago by Géry Ogam <[email protected]>
Sync typeshed (#12321)

Source commit:
https://github.com/python/typeshed/commit/3c85f36b7f9afd599409d10a214aafdecf38251e

756277c8bbab01dab0833c7f18d3f2765211352b authored almost 3 years ago by Jukka Lehtosalo <[email protected]>
Minor proper subtype check optimization (#12536)

Mypyc is bad at compiling nested functions. In one use case
we were spending 7% of the mypy run...

222029b07e0fdcb3c174f15b61915b3b2e1665ca authored almost 3 years ago by Jukka Lehtosalo <[email protected]>
Further speed up union simplification (#12541)

This tweaks a change made in #12539 that may have slowed things
down. The behavior introduced i...

ab6185e29227d392f6534a95cd0a2258c5b4817c authored almost 3 years ago by Jukka Lehtosalo <[email protected]>
Speed up caching of subtype checks (#12539)

This is very performance critical. Implement a few micro-optimizations
to speed caching a bit. ...

cddd819d82e08c4c4dcd9edadd16db949972898c authored almost 3 years ago by Jukka Lehtosalo <[email protected]>
Speed up LiteralType.__hash__ (#12540)

It can be a bottleneck in some use cases.

75e907d95f99da5b21e83caa94b5734459ce8916 authored almost 3 years ago by Jukka Lehtosalo <[email protected]>
Speed up Instance.__hash__ (#12538)

This shows up as a bottleneck in some use cases, based on
profiling.

This should help with u...

ab1b48808897d73d6f269c51fc29e5c8078fd303 authored almost 3 years ago by Jukka Lehtosalo <[email protected]>
Improve checking of "__slots__" (#12531)

Don't rely on `object.__slots__` being defined, since it's not
defined at runtime (and currentl...

e7e1db6a5ad3d07a7a4d46cf280e972f2342a90f authored almost 3 years ago by Jukka Lehtosalo <[email protected]>
Basic ParamSpec Concatenate and literal support (#11847)

This PR adds a new Parameters proper type to represent ParamSpec parameters
(more about this i...

07d88787774fabbd3108d18621b30df9b42e7c83 authored almost 3 years ago by EXPLOSION <[email protected]>
Fix union simplification performance regression (#12519)

#11962 can generate large unions with many Instance types with
last_known_value set. This cause...

4ff8d0425618d19ba99b562389fb26e914ea100e authored almost 3 years ago by Jukka Lehtosalo <[email protected]>
Implement boxed constant integers as literals (#12507)

This avoids creating a new int object every time
we evaluate an integer literal in a context th...

0e8a03cb5c9954149da38096b496b7a74f74a1b0 authored almost 3 years ago by Jukka Lehtosalo <[email protected]>
[mypyc] Fix incorrect borrowed flag for setdefault() primitive (#12514)

`CPyDict_SetDefaultWithNone` doesn't return a borrowed reference,
since it just calls `CPyDict_...

ee0638f3c3b68f5970cf8c2c643156c370017ee4 authored almost 3 years ago by Jukka Lehtosalo <[email protected]>
Fix minor docs inaccuracy: `NoneType` is exposed in the `types` module on Python 3.10+ (#12515)

1c5073044f2266099e0b619687d007b522672eb0 authored almost 3 years ago by Alex Waygood <[email protected]>
Refactoring: Remove the "erased" attribute of Instance (#12499)

It's not used for anything.

b44d2bc54ff0401eed8ff69afd03db6a09910140 authored almost 3 years ago by Jukka Lehtosalo <[email protected]>
Include link to PEP484 in README (#12492)

544d21a43762a526bdc53098a1fae87627d4a454 authored almost 3 years ago by gresm <[email protected]>