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

Documents explicit type aliases (#11800)

Refs https://www.python.org/dev/peps/pep-0613/

Co-authored-by: Jelle Zijlstra <jelle.zijlstra...

578898dabae9a6c91b8f1081630c91cbe7e6f5be authored about 3 years ago by Nikita Sobolev <[email protected]>
Allow calling a function with name '_' (#11810)

Fixes #11774. The issue has relevant background information in the
discussion.

It may be wor...

f8cf2e7e5cecabce3d9f38730ccefff7ae5027ee authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Enums with annotations and no values are fine to be subclassed (#11579)

Closes #11578. Closes #11702.

6de254ef00f99ce5284ab947f2dd1179db6d28f6 authored about 3 years ago by Nikita Sobolev <[email protected]>
[mypy_primer] run using 3.10 (#11798)

Co-authored-by: hauntsaninja <>

56684e43a14e3782409c47e99bb47191d631a3de authored about 3 years ago by Shantanu <[email protected]>
Fixes docs: there's no `semantic_analyzer_pass3` anymore (#11788)

63abf4b5b26edb2c7db2a9ff50dfa0e63a43434a authored about 3 years ago by Nikita Sobolev <[email protected]>
curses.tigetstr() can return None (#11781)

Found by python/typeshed#6620

5253f7c0214f598bdc8b96e0e90e9dd459a96b25 authored about 3 years ago by Jelle Zijlstra <[email protected]>
Update version to 0.940+dev (#11771)

4602c4dad026dcc64cb94d531d5ce4615c7c3a01 authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Update version to 0.930+dev (#11770)

This is for the 0.930 release branch. I'll update the master to
0.940+dev afterwards.

7869550862caf3389cb3c22e0f05f70b0d411309 authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Fix tests for Python 3.10.1 (2) (#11756)

Followup to #11752. The syntax error changed between 3.10.0 and 3.10.1.
https://bugs.python.org...

18d5669355d27e6ee70512535f073d1b8c912807 authored about 3 years ago by Marc Mueller <[email protected]>
Fix inferring constrainta from param spec callable against Any (#11725)

We didn't infer constraints from the return type.

Fixes #11704.

22ab84acc3f6174905a05ddadab94b6c2d83f9a1 authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Fix ErrorCode test for Python 3.10.1 (#11752)

https://bugs.python.org/issue46004

61f054310381c45c7f2e32987442826c2a79b76e authored about 3 years ago by Marc Mueller <[email protected]>
Enforces having unique test ids in a single namespace (#11687)

I found lots of duplicate test names. It might hide important errors, be hard to reproduce
or ...

b4df2b341c345bb009210783dddeb454e7b45fc5 authored about 3 years ago by Nikita Sobolev <[email protected]>
Fix crash when encountering match statement (#11749)

The crash only happens with compiled mypy on Python 3.10, I think.

9e34f6ac4327cc929ab6f4c4153c130242a0a149 authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Add Python 3.10 to trove classifiers (#11747)

Co-authored-by: hauntsaninja <>

602e8900842e8a85e554e2f4304d9ae19a71214b authored about 3 years ago by Shantanu <[email protected]>
Cherry-pick some stub fixes from typeshed (#11739)

* Typeshed cherry-pick: Relax signature of logging.config.loadConfig (#6577)

* Typeshed cherr...

5d71f58b9dc5a89862253fef3d82356a7370bf8e authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Revert "Now typechecks `traceback` in `raise e, msg, traceback` on py2 (#11289)" (#11743)

This reverts commit c22beb431a682330276aff2a84b4796abadf71b4.

See #11742 for context.

510e0430700b5c07dfb8ee8130f09f67e3f7671b authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Revert "Imporves `__div__` with `__future__` import on py2 (#11276)" (#11741)

This reverts commit e6b91bdc5c253cefba940b0864a8257d833f0d8b.

See #11740 for the context.

538e7e64fd32124f5df42f6ca1b045955892af14 authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Don't crash on unsupported Python 3.10 match statement (#11738)

Generate a syntax error instead.

b2c9296c53456d71f19d99d6a6332de5c167ee6b authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Add script for cherry-picking commits from typeshed (#11737)

bb934e9a0fad271d810d61aea241a190bac1ecb4 authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Drop version upper bound for mypy-extensions (#11735)

This may avoid some package version conflicts in the future. We just
need to be careful to avoi...

9898ea4e3253565ca63276d5f2f1563fc6415f40 authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Drop version upper bound from tomli (#11733)

Tomli seems to be moving fast -- 2.0 was released ~6 months after 1.0. It
seems better to suppo...

441915401336f5b88f11b0a24dcca5904d8f4388 authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Fixes `bool` and `Literal[True, False]` subtyping, refs #11701 (#11709)

In some places in our code bool was compared with `Union[Literal[True], Literal[False]]`.
It wa...

ef4341619d7bcd298ce83dd2f9e0e2d805871c72 authored about 3 years ago by Nikita Sobolev <[email protected]>
Upgrade tomli (#11729)

Tomli 2.0.0 was released https://pypi.org/project/tomli/2.0.0/

Co-authored-by: KotlinIsland <...

6b6099b0f59a889d2db77727d75c7d77250ca589 authored about 3 years ago by KotlinIsland <[email protected]>
Marks `mypy/typeshed` as vendored path (#11726)

01a2d98bc480ea9e1575f2adab47c0cfbca1c8d0 authored about 3 years ago by Nikita Sobolev <[email protected]>
Remove assumption of case sensitivity (#11708)

Originally added in #10093

Fixes #11690, fixes #10661, fixes #10822

Co-authored-by: haunts...

4d2ff58e502b52a908f41c18fbbe7cbb32997504 authored about 3 years ago by Shantanu <[email protected]>
Fix crash involving undefined cyclic `import *` (#11681)

Fixes #11064. Co-authored by @hi-ogawa

Pushes #11346 over the finish line. Implements the su...

b64091419593c5da42e4253caeb8b4ceaab9ce6d authored about 3 years ago by Shantanu <[email protected]>
Special cases `Enum` and some special props to be non-final, refs #11699 (#11713)

Closes #11699

19700294d46781ea50c543efa9120851e2827d1b authored about 3 years ago by Nikita Sobolev <[email protected]>
Handle OSError when checking cache stat.mtime (#11718)

If we get an error when accessing the mtime of a cache file, we should handle that as if the cac...

5f7a3f1a54dd69973a0cc918062b7a18a8342ed0 authored about 3 years ago by Zac Hatfield-Dodds <[email protected]>
Remove unused `temp_message_builder` (#11696)

d5b66a8411036d300e8477be6d1bd40bd28ada28 authored about 3 years ago by Nikita Sobolev <[email protected]>
Revert "Now `lambda` is counted as a valid context in `handle_cannot_determine_type` (#11215)" (#11694)

This reverts commit d37c2be0f7a2002a0a8c160622d937518f902cc7.

Lambdas can't be safely deferre...

a1f785e338e80651894005a34f5e124b9b1e86ac authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Fix `None` assignments with fine-grained cache (#11574)

Problem: When using the fine-grained cache, we raise an assertion in
some situations when an at...

1393e3fec49a9505fd3a31f3406ddd4e2e1c54b8 authored about 3 years ago by Christian Bundy <[email protected]>
Fix crash involving unreachable binary ops (#11680)

Fixes #11679

e20042f26d1ae535ad1feab1bb5e00c3c451c240 authored about 3 years ago by Shantanu <[email protected]>
Enable running separate mypy test modules (#11668)

01e6aba30c787c664ac88d849b45f7d303316951 authored about 3 years ago by Nikita Sobolev <[email protected]>
PEP 655: Support Required[] inside TypedDict (#10370)

Adds support for the Required[] syntax inside TypedDicts as specified by
PEP 655 (draft). NotR...

abb0bbb5c70912dd6cbb91638073cc88d4c45caf authored about 3 years ago by David Foster <[email protected]>
Refactor `if`s into util function (#11663)

* Follow up to #11150, refactors `if`s into a util function

f1eb04ad379fa7492b88794d2c575461079b478a authored about 3 years ago by Nikita Sobolev <[email protected]>
Fix crash involving explicit reexport, import cycle, wildcard (#11632)

Fixes #8481
Fixes #9941
Fixes #11025
Fixes #11038

This is the unresolved crash that's been...

cee5d3e9a29f43a10a8eeca760976657bf1689c9 authored about 3 years ago by Shantanu <[email protected]>
Now `TypeInfo.get_method` also returns `Decorator` nodes (#11150)

Support decorators properly in additional contexts.

Closes #10409

4e34fecfe59d83aa3b9e04cbde1834aff7a47e5d authored about 3 years ago by Nikita Sobolev <[email protected]>
Better error message for nested TypedDict (#11658)

872bc8697106188121c3e0aaeda112d756604a9f authored about 3 years ago by 97littleleaf11 <[email protected]>
Port mypyc to Python 3.11: use Py_SET_SIZE() (#11652)

"Py_TYPE(t) = metaclass;" fails with a compiler error on Python 3.11:

* https://docs.python.o...

2b7e2df923f7e4a3a199915b3c8563f45bc69dfa authored about 3 years ago by Victor Stinner <[email protected]>
stubtest: increase coverage (#11634)

Co-authored-by: hauntsaninja <>

7a2aff8e1b917dad6d847342c64646934075ddd2 authored about 3 years ago by Shantanu <[email protected]>
Document stubtest (#11636)

Co-authored-by: hauntsaninja <>

72feb61d1f3e150adabb569aba0833197a013790 authored about 3 years ago by Shantanu <[email protected]>
Disable universal newlines when reading TOML (#10893)

* Disable universal newlines when reading TOML

* Update mypy/modulefinder.py

Co-authored-b...

02d6c7ab2042c6d1d35b1e4b59e7437b589ea685 authored about 3 years ago by Taneli Hukkinen <[email protected]>
Use analyze_member_access instead of find_member (#11638)

3027cd62548c23c50094787118e56fc3969f944a authored about 3 years ago by Nikita Sobolev <[email protected]>
Fix grammar in docs (#11642)

ee8a5ca58066d77c920d028fabf1ed94b5af46c5 authored about 3 years ago by Peter Law <[email protected]>
Add test case for non callable operator with getattr (#11637)

Co-authored-by: hauntsaninja <>

46eb516e236606ba696a1854ed7047f5b47d5226 authored about 3 years ago by Shantanu <[email protected]>
Fix new lint warning (#11635)

Looks like there was a new release of flake8-bugbear

4f59ca490072a45dce5839e6397791d79dcf3352 authored about 3 years ago by Shantanu <[email protected]>
mypy/build: Use` _load_json_file` in `load_tree` (#11575)

e557ec242b719e386a804766b0db8646f86ef0e3 authored about 3 years ago by William Woodruff <[email protected]>
Fix crash with overload and callable object decorators (#11630)

Fixes #8356, as identified by @pranavrajpal
Fixes #9112
Fixes #9967

Note that we still don'...

7b13ff87a786e3511c9646bd3827a1344c4fb1f5 authored about 3 years ago by Shantanu <[email protected]>
Install types to correct environment (#11457)

Fixes #11405 by using `options.python_executable` instead of `sys.executable`.

902df03fa12ca9b39ad3ee11235c6558792782f4 authored about 3 years ago by Konstantin Weddige <[email protected]>
[mypy_primer] use merge base as base commit (#11627)

Solves https://github.com/hauntsaninja/mypy_primer/issues/21

Co-authored-by: hauntsaninja <>

578d38921cdf2296605fc14595559ddeea13103a authored about 3 years ago by Shantanu <[email protected]>
README.md: use ready to paste terminal commands (#11629)

ffb1bacdf16acbd5022afb2376608b013f9a2bcd authored about 3 years ago by parthaxntn <[email protected]>
Remove repeated word (#11628)

98fc8aa5b1603067174f47493f98af3f3ad3c69a authored about 3 years ago by Alex Waygood <[email protected]>
Improve documentation for annotating generator functions (#11623)

The mypy documentation is currently ambivalent on whether ``Iterator`` or ``Iterable`` is the be...

ca00633f971fe83058cd1609d7918d9e3e9a1ec2 authored about 3 years ago by Alex Waygood <[email protected]>
Adds strict mode to pytest (#11626)

408375ff4a7a20013a17919f8198cfca499d05ff authored about 3 years ago by Nikita Sobolev <[email protected]>
Now TypedDict member access is routed via `checkmember` (#11244)

Closes #10631.

Now TypedDict membet access is routed via `checkmember`. Remove sig plugin
fo...

2f409dc3896cb6ef5c640c278a273c20a4d18582 authored about 3 years ago by Nikita Sobolev <[email protected]>
Fix typing_extensions version in requirements (#11622)

mypy imports TypeAlias in typing_extensions, which
was introduced in typing_extensions 3.10.0.0...

71c5a0e37741a4452803122ef23b76c022fab607 authored about 3 years ago by Noé Rubinstein <[email protected]>
Fix function containing PEP 593 Annotated with a string literal second arg causing 'Name "x" is not defined" error (#10777)

Fixes #9868

When analyzing function definitions, mypy attempts to infer type variables. The c...

40b6b9b151aecdf9e9c821ed852be0415d4823eb authored about 3 years ago by Seth Yastrov <[email protected]>
Correct documentation for NewType (#11621)

NewType is a class in Python >=3.10, meaning the mypy documentation is no longer accurate.

Cl...

eea4c76de4a67a36e3a2293eae9a2e775c636e1d authored about 3 years ago by Alex Waygood <[email protected]>
[mypyc] Introduce ClassBuilder and add support for attrs classes (#11328)

Create a class structure for building different types of classes, extension vs non-extension, pl...

1bcfc041bb767ee93e90676b0a61f3e40267e858 authored about 3 years ago by Chad Dombrova <[email protected]>
Now `ClassVar` cannot contain type variables (#11585)

Resolves part of #11538

f79e7afec2c863c34d7a9b41ebb732dc26128fff authored about 3 years ago by Nikita Sobolev <[email protected]>
Adds explicit test for overloads with pos-only `self`(#11608)

See #11606 for discussion

077e82076fcca9a71800931c2500531428ccb8ec authored about 3 years ago by Nikita Sobolev <[email protected]>
Refactor checkexpr error messages (#10960)

b4256a105b9744a12792d87784bea67b60b5db12 authored about 3 years ago by Tushar Sadhwani <[email protected]>
Improve type checking of ParamSpec in calls (#11603)

Check that the correct ParamSpec and flavor are used in
`*args` and `**kwargs`.

Follow-up to...

b47245adc60eecde9164799c426f3bffcedbc48e authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Improve ParamSpec type inference from lambda (#11602)

If ParamSpec is in the context of a lambda, treat it similar
to `Callable[..., Any]`. This allo...

83e9e3b50f10dd817fce00fd706ca56d4cea0162 authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Sync typeshed (#11600)

Source commit:
https://github.com/python/typeshed/commit/2445eddb4b67fdaa58ec7c2113ff1542021a6206

4996d571272adde83a3de2689c0147ca1be23f2c authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Basic support for ParamSpec type checking (#11594)

Add support for type checking several ParamSpec use cases (PEP 612).

@hauntsaninja previously...

ce3975d228f9956061b00e0a71c76711dc1d497d authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Remove duplicated indefinite articles in doc strings (#11596)

9c86f9ba798146db6490fff7d74e0d8365b3c855 authored about 3 years ago by KotlinIsland <[email protected]>
Update strict equality allowlist (#11599)

Names of some of types have changed in typeshed. Accept both
the old and the new names for now....

761e1b6af620d9da49f49cbe8a6fbad536107d64 authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Don't use ModuleType.__getattr__ if we know module symbols (#11597)

python/typeshd#6302 added `__getattr__`, but we don't want to always
use it, as it can result i...

8610329beea2ca621581de6b8bfea4ebdb7615e8 authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Prepare for typeshed sync: `__file__` could be None (#11598)

Typeshed now declares `__file__` as an optional type.

bc5b919af56f576eb336c1210c587d689cb07a6f authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Factor out field_makers alongside dataclass_makers (#11584)

fbcb4a87b43e93352cb7983c48579d57faaa8a24 authored about 3 years ago by Neil Girdhar <[email protected]>
Microrefactoring: removes unused `value` from `map_actuals_to_formals` (#11586)

8fe86d195f6636547fd837b1c26b47a67eb66fdb authored about 3 years ago by Nikita Sobolev <[email protected]>
Reduce amount of debug info injected in extension modules (#11526)

This can help in decreasing memory resource requirements on CI and
generating relatively thinne...

21897149830f36fee8d7c639b8d7596ce6e24ea4 authored about 3 years ago by Nehal J Wani <[email protected]>
stubgen: use sys.version_info, rather than hardcoding 3.6 (#10907)

Not too familiar with stubgen, so maybe there's a good reason for
hardcoding, e.g. to ensure st...

4dfa38c53d5bed4f1ce020440c934d998770e3d8 authored about 3 years ago by Shantanu <[email protected]>
Graceful exit on KeyboardInterrupt (#10725)

Catch KeyboardInterrupt to allow graceful exit instead of printing the traceback.

Adds option...

d7c4e6908c71a45e6fab73887b3d1a42a7848247 authored about 3 years ago by Marc Mueller <[email protected]>
Correctly handle cls in protocol classmethod (#11119)

Closes #11115.

Correctly handle cls in generic classmethods of protocol.

This should corr...

89bb94a636790fc969979a47d8cb88e33a22c17e authored about 3 years ago by Ilia Novoselov <[email protected]>
Now `print >>` is properly checked (#11576)

e2178b8a2e010b4180de0d3228913901a2627f76 authored about 3 years ago by Nikita Sobolev <[email protected]>
Now we can override attributes with methods, refs #10134 (#11561)

Now we can override attributes with methods.

Closes #10134
Closes #11556

Co-authored-by: ...

cc6c8a99eb7ee40679135bde5700f030fa327d47 authored about 3 years ago by Nikita Sobolev <[email protected]>
Revert "Fix callable instance variable support (#10548)" (#11571)

This reverts commit 6ab0efcc2ae3bcf649098b86d1edbcab2e4b1e9b.

Reverting the change since it c...

43eecdb0969c8cb8777fa802ba53e11075b4c802 authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Update fine-grained tests to prep for --namespace-packages support (#11259)

9a10967fdaa2ac077383b9eccded42829479ef31 authored about 3 years ago by Nipunn Koorapati <[email protected]>
Capitalize unused type ignore message, for consistency (#11569)

50db29a527595822fe6f76053a6a54f5c301649a authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Point to some resources at top of bug template (#11563)

f994bfe942e398b3eec7cab3e51cc97448a67316 authored about 3 years ago by Ethan Smith <[email protected]>
Fix crash related to AST diff of ParamSpec in mypy daemon (#11567)

Fixes #11566.

50fb2d4cfbb823d0d64d5bfcb8a26edea4aa48ef authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Improves `TypeVar` error messages (#11448)

7f0ad943e4b189224f2fedf43aa7b38f53ec561e authored about 3 years ago by Nikita Sobolev <[email protected]>
[mypyc] Inline increfs and decrefs in commonly executed blocks (#11540)

These operations are performance-critical, but inlining everywhere
can slow down compilation a ...

7a5c6f0bdbd50757ffe0a826bd758f0d44780607 authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Enable --fast-exit by default to speed up mypy (#11541)

Closes #6662.

This means that we kill the mypy process at exit instead of cleanly
freeing up...

053a1beb94ee4e5b3260725594315d1b6776e42f authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Adds `typing_extensions.OrderedDict` alias, refs #11528 (#11533)

Closes #11528

f9bf6491c477a99e420a36520ed8faf82235ea3b authored about 3 years ago by Nikita Sobolev <[email protected]>
Reduce the number of executed local imports (#11545)

This should speed things up a little, because mypyc
is bad at compiling local imports (mypyc/my...

8f281fbc3c863402ef9c15ba348040bfe622654e authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Minor optimization/cleanup (#11544)

if TYPE_CHECKING is compiled inefficiently right now (mypyc/mypyc#902).

45a9d84540d1c85758f068dd33488ea3847eff40 authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Optimize CallableType.formal_arguments (#11543)

Don't use a generator, since they tend to be slow when compiled.

This method came up as a hot...

639f27233060d3bb1d9a4d4d4cc8ef8f708101d4 authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Only read the stdlib versions dict once per run (#11542)

This was being read repeatedly, and it was bad enough to
show up in a performance profile.

56a6bf7267d4d7ad97d29eda1c3d2803ff34740b authored about 3 years ago by Jukka Lehtosalo <[email protected]>
Fix get_dynamic_class_hook does not work in some scenarios (#10904)

The get_dynamic_class_hook method of the plugin never called if the statement
is a chained ass...

f316cc2d4b510b79aadb78e0c7fe2814183c93d1 authored about 3 years ago by 林玮 (Jade Lin) <[email protected]>
Bump typed_ast max dependency (#11531)

143cb52a1486c1b74b2590896e425fd33a969fcb authored about 3 years ago by Sebastian Rittau <[email protected]>
[mypyc] Faster max (#11530)

Description
Closes mypyc/mypyc#773, follows up to #10265

aeb65a6ff8cace69d4f2a04dcf511cce2cd8bf21 authored about 3 years ago by 97littleleaf11 <[email protected]>
[mypyc] Faster min (#10265)

Speeds up `min(x, y)` using a specializer.

Co-authored-by: 97littleleaf11 <97littleleaf11@gm...

0b4cb1e52137124f32923f515c4d80a6e9cde8fd authored about 3 years ago by Chetan Khanna <[email protected]>
Allow keyword arguments in __setattr__ (#11525)

This actually works at runtime and is used sometimes for pseudo-immutable types.

Co-authored-...

60f80e00b8270683ba3aa9c72a34248d5d7e407a authored about 3 years ago by Ivan Levkivskyi <[email protected]>
Remove `builtins.` from error messages (#11522)

Closes #5072, follows up to #11490

e32f35ba09203dfafe2d32c73b0317175553b207 authored about 3 years ago by 97littleleaf11 <[email protected]>
Use implementation artifact Any for constraint target (#11523)

This is a follow-up for #11460

fc609cdfca698b3e1eaeeb50a74acf296d3a25c4 authored about 3 years ago by Ivan Levkivskyi <[email protected]>
Try fixing union inference including Any (#11460)

This replaces dropping trivial (i.e. `Any`-only) constraint sets with merging the `Any` targets ...

4037b6a082556dab352a182c7671939073f25b26 authored about 3 years ago by Ivan Levkivskyi <[email protected]>
Restore comment in stubgen (#11515)

As pointed out by @pranavrajpal in https://github.com/python/mypy/pull/11498#discussion_r746886480

421fcc2362ad9cec32fe06d666a3ac9b343b5a8a authored about 3 years ago by Shantanu <[email protected]>