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

Update hashes in `misc/sync-typeshed.py` following typeshed sync (#15447)

Followup to #15444

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

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

9f3bbbeb1f5c8ca70f9d0386d5d1091f23e9a7cc authored over 1 year ago
Sync typeshed

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

59a6c5e73de6b92faa2c25e39856fb43380f82ed 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 ...

475a46a7820e1ff7990a23c6ae745acbb3678c18 authored over 1 year ago
Revert typeshed ctypes change

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

f5e5c117de36a339209c885d44b1b784e17023a4 authored over 1 year ago
Additional validation for TypeVar defaults (PEP 696) (#15442)

Check that `default` type is a subtype of `bound` or one of the
constraint types.

Add `defau...

66b96ed54b255495288ba539e3fd1f54f21d4abe authored over 1 year ago
Fix readthedocs build (#15437)

I initially included an error (removed allowlisted error code that is
not covered), to verify i...

e14cddbe31c9437502acef022dca376a25d0b50d authored over 1 year ago
Use consistent anchors for error codes (#15435)

Fixes #15431

After this PR one will be able to easily find documentation for given
error cod...

db97bbcede7ddeaecb3da31ee00f1812b115b8a4 authored over 1 year ago
Fix dmypy run on Windows (#15429)

Fixes #10709

Two changes here:
* Add equality methods to `ErrorCode` because they may appea...

cdddc508c3533b960786841253e1aba251802081 authored over 1 year ago
docs: ref redirector (#15432)

Makes the HTML builder generate a _refs.html file that redirects
(global) refs (when provided a...

c63e873802fecfc3f817dceb94c729a6965e3489 authored over 1 year ago
[out] version checks must be against min version or higher (#15430)

2a89f752dc174b4f0b99291c4a6bf10338dbbd5e authored over 1 year ago
Remove special casing for "cannot" in error messages (#15428)

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

61a7f3bfa37c433ac34f4f07dc224a1745577c82 authored over 1 year ago
test_parse_data: fix cwd (#15417)

Fixes https://github.com/python/mypy/pull/15385#issuecomment-1587030261

cab8c674ebef944498ae4e9a89cd9c77316656ec authored over 1 year ago
[mypyc] Don't explicitly assign `NULL` values in setup functions (#15379)

While investigating something unrelated I stumbled across the `*_setup`
functions, and I notice...

9b9272ae758e23653c81c94031ec03892d31622a authored over 1 year ago
Increment version for 1.5-dev (#15405)

4aa18ea818bfe55617c3f2423d1020796ceccdfc authored over 1 year ago
Always allow returning Any from lambda (#15413)

9e7bc383eb9a5df94e8bf6117f008d97017a1fcf authored over 1 year ago
Add get_expression_type to CheckerPluginInterface (#15369)

Fixes #14845.

p.s. In the issue above, I was concerned that adding this method would
create ...

a108c670c395c719e81cd87674654daf54ec95ee authored over 1 year ago
Fix crash on follow_imports_for_stubs (#15407)

e7b917ec7532206b996542570f4b68a33c3ff771 authored over 1 year ago
Fix crash on NamedTuple as attribute (#15404)

Fixes #15380

Note I also update the `NamedTuple` fixture to be much closer to real
definitio...

3cedd2725c9e8f6ec3dac5e72bf65bddbfccce4c authored over 1 year ago
Correctly track loop depth for nested functions/classes (#15403)

Fixes #15378

2c66cba59fefadd0f3ab71a605d9a458fb14f1f6 authored over 1 year ago
Fix crash on joins with recursive tuples (#15402)

Fixes #15351

This may have some perf impact, but I predict it will be minimal (and I
didn't ...

3e982a0bd3b7d4e25edc4046af07e2c2c1011784 authored over 1 year ago
Fix abstract and non-abstract variant error for prop.deleter (#15395)

4baf672a8fe19bb78bcb99ec706e3aa0f7c8605c authored over 1 year ago
Improve stubtest error message (#15398)

27593bc23cf6be4ad9a37d6c1bc13abc5f2190ec authored over 1 year ago
Fix stubtest crash in explicit init subclass (#15399)

e253e7660d48422d3a0ea643bc1b11419fb3cddc authored over 1 year ago
.git-blame-ignore-revs: exclude com2ann refactor (#15400)

8dde298fba2e021d1309a0d796a4a7efccc11e41 authored over 1 year ago
Fix crash when indexing TypedDict with empty key (#15392)

f54c3096b7d328dc59dd85af3a8ba28739dcfed0 authored over 1 year ago
Make .test parser friendlier (#15385)

fe0714acc7d890fe0331054065199097076f356e authored over 1 year ago
Update semantic analyzer for TypeVar defaults (PEP 696) (#14873)

This PR updates the semantic analyzer to support most forms of TypeVars
with defaults while als...

2ab8849f6460fe586a1a1add3a006ce4edd3fb75 authored over 1 year ago
testupdatedata: fix cwd (#15383)

This should allow the inner pytest to pass even when the outer pytest is
invoked outside of the...

8409b884e97de82bc1638dc91ca26b85d06f3de2 authored over 1 year ago
Do not block on duplicate base classes (#15367)

Continue type checking if a class has two or more identical bases.
Closes https://github.com/py...

66bd2c441277b29b1454e26b2a3454a0dae5fb18 authored over 1 year ago
fix(docs): bool -> boolean in config_file.rst (#15352)

21c5439dccfc6fc21f126200b95b0552f503d5da authored over 1 year ago
[mypyc] Use correct rtype for variable with inferred optional type (#15206)

```python
def f(b: bool) -> None:
if b:
y = 1
else:
y = None

f(F...

f8f9453083c416237247a6596692c8d2b42adc78 authored over 1 year ago
[mypyc] Inline math literals (#15324)

This PR inlines math literals such as `math.pi` and `math.e`. Previously
Using `math.pi` would ...

c4f55aefb17d3c12f036f2cc99ac7cc89f252915 authored over 1 year ago
--update-data should not touch xfail tests (#15337)

c0af000d068b30362c4f4f72b8823e4f3f5b3e08 authored over 1 year ago
Sync typeshed (#15334)

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

d11db284368e73e0e277fb9134ef5f3a0b0618e6 authored over 1 year ago
Fix crash with custom ErrorCodes (#15327)

A class marked with `allow_interpreted_subclasses=True` implicitly
supports serialization while...

3d2f43772262060fdb1921933da6dc8c7d8ad8a1 authored over 1 year ago
Improve --update-data handler (#15283)

3e034848a29acc374379ae68ff9c450fdb9cc2a2 authored over 1 year ago
Update workflows to trigger for main (#15310)

Preparation for #13985 to make the transition from `master` to `main` as
seamless as possible.
...

85e6719691ffe85be55492c948ce6c66cd3fd8a0 authored over 1 year ago
Add foundation for TypeVar defaults (PEP 696) (#14872)

Start implementing [PEP 696](https://peps.python.org/pep-0696/) TypeVar
defaults. This PR
* Ad...

a568f3ab178ad261b5f45db6ec2c73113afbd287 authored over 1 year ago
stubgen: Do not remove Generic from base classes (#15316)

7fe1fdd6f805025b1121380e73bcda38b707c546 authored over 1 year ago
Fix match subject ignoring redefinitions (#15306)

Fixes #14746

da5dffc444544507ba4ab35610c73ac301bcea83 authored over 1 year ago
[mypyc] Try adjusting error kinds for all blocks (#15262)

`adjust_error_kinds()` should be run over every block, but the old impl.
of `insert_exception_h...

ac6dc18545c9eafbf576e1151f7f698ec1f1b256 authored over 1 year ago
Propagate TypeVarType column in TypeAnalyser (#15304)

Also use keyword arguments + copy_modified for this in many places

f66199f087f4b94b5d3f9c05fa9a438b251b3ccb authored over 1 year ago
Support __all__.remove (#15279)

See #12582. pyright supports this pattern as well.

cbf16658826a1a6372d6bebc298505c67f9fc7bc authored over 1 year ago
TestItem: convert to dataclass, remove class vars (#15286)

`TestItem` has instance attributes, so it doesn't need the class vars.

b8dd40e741913a4addb58b3b7e50f076659bccd5 authored over 1 year ago
testcheck: sort inline assertions (#15290)

The order in which inline error assertions are collected into the
`TestCase.output` (the "expec...

9270819a41758856e5d03769c6ed274047cb5819 authored over 1 year ago
teststubtest: assert on output without color (#15292)

These tests have been failing when running in some terminals:
```
FAILED mypy/test/teststubtes...

5d6b0b657044c5c3e45c5894033acd8ca7293152 authored over 1 year ago
Fix stubtest tests with typing-extensions>=4.6.0 (#15294)

`teststubtest.py` is currently failing on `master` due to changes that
were made to `typing_ext...

b8f8d800fc1d72452af67aa0ae64c48bfacb0c92 authored over 1 year ago
Fix --export-ref-info with type variable with value restrictions (#15285)

The regular function body has no type information if the function uses
a type variable with a v...

1ee465c9bd06170ea1a82765ec744e64cbd2a4be authored over 1 year ago
Fix class method and static method calls with --export-ref-info (#15282)

Previously they were sometimes reported as `builtins.type.method_name`
(i.e. a method of `built...

caf4787d10dffc68fdf82556aebb00bced7a599e authored over 1 year ago
[mypyc] Remove unused labels and gotos (#15244)

This PR removes labels which are never jumped to, as well as removing
gotos that jump directly ...

6c7e480de047a1f08d02b56cd47ca0d0ac6bf685 authored over 1 year ago
stubgen: Support `yield from` statements (#15271)

Resolves #10744

2ede35fe24ad1c6c2444156c753609f6b7888064 authored over 1 year ago
Detailed 'signature incompatible with supertype' for non-callables (#15263)

Previously the "signature incompatible with supertype" error only
included detailed comparison ...

c2d02a34fd513a347c60fdb73feceebc27f44d53 authored over 1 year ago
Support for variadic type aliases (#15219)

Fixes #15062

Implementing "happy path" took like couple dozen lines, but there are *a
lot* ...

0334ebcfab63a85814e1e129f309525b160f4094 authored over 1 year ago
Add support for `attrs.fields` (#15021)

This add support for `attrs.fields`, which is a nicer way of accessing
the attrs magic attribut...

391ed853f7857222d7eb209ecdc48f0a130f70d7 authored over 1 year ago
stubgen: fixes and simplifications (#15232)

This PR refactors name resolution in stubgen to make it simple to use
and fixes a bunch of rela...

d98cc5a162729727c5c90e98b27404eebff14bb5 authored over 1 year ago
Use attrs and @attrs.define in tests (#15152)

"attrs" namespace, "attrs.define" and "attrs.field" are the recommended
new namespace and API o...

24b585f62566e7dd518787719b5e61ded940a11f authored over 1 year ago
Add `--local-partial-types` note to dmypy docs (#15259)

Fixes https://github.com/python/mypy/issues/15214 but adding a note to
the dmypy docs.

d9d893f80b322cb1486c35479c0e9e37d9bcbd5b authored over 1 year ago
Add regression test for asserting distinct callable types (#15258)

Closes #15153.

This issue was already addressed in #15184; we're adding a regression
test.

863cabb533804895e8feb3b601510b52d947115b authored over 1 year ago
.git-blame-ignore-revs: add PEP-604 refactor (#15266)

Follow up to #13427.

af39755c27cc9563d1e80bdf259b6d574f48ea57 authored over 1 year ago
Clarify difference between disallow_untyped_defs and disallow_incomplete_defs (#15247)

Fixes #9963, fixes #12693

2e6d11ea786cce95b718b73d07bc89a320d9ccbc authored over 1 year ago
Fix type analysis for typing.Unpack (#15228)

We were checking only for `typing_extensions.Unpack`, which breaks code
when checking at 3.11+ ...

905c2cbcc233727cbf42d9f3ac78849318482af2 authored over 1 year ago
Pass log-file and timeout args to daemon as proper args (#15227)

Currently, when starting the mypy daemon, we're passing the timeout and
log_file as part of the...

ce2c918f73fa4e98c9d0398401431fc45b608e29 authored over 1 year ago
[mypyc] Support unpacking mappings in dict display (#15203)

Fixes mypyc/mypyc#994.

16667f383d84add3c8d48f6c608f043d4ef62eb3 authored over 1 year ago
Fix mypyc 32-bit build (#15245)

acce2709bac5cd65e983b694ce162f42e4a87176 authored over 1 year ago
Sync typeshed (#15242)

Source commit:

https://github.com/python/typeshed/commit/15a0c28530ffcda0d4be2026511af3604336...

848b2d39f03a4c0df60d324422bae1bbf6c5f35d authored over 1 year ago
`config_file.rst`: fix lint (#15239)

pre-commit is failing on `master`:
https://github.com/python/mypy/actions/runs/4970566646/jobs/...

5e93a465a28a8e5d0e9820c6fa195c26570a87d9 authored over 1 year ago
Add pre-commit hooks for autofixing trailing whitespace (#15237)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

449052583986c3b3a0e7f2e917516e7b910dc163 authored over 1 year ago
Improved config_file.rst writing (#15234)

Fixes #7961

2df6f365b52a2a230c698af148a50ce7fb9d3108 authored over 1 year ago
Better message for truthy functions (#15193)

Fixes case 1 in https://github.com/python/mypy/issues/14529

f176f6a14f76050d786463a977e735c6a648fd76 authored over 1 year ago
Capitalize syntax error in type comment messages (#15236)

Fixes #15132

9ecc4efb1d5f86394394f49a4964926ccf183c1c authored over 1 year ago
Update getting started docs for mypyc for Windows (#15233)

Update the link to latest version MS has on its website. (there's no
more build tools for 2017,...

ffdaee98a82e525d529b647b9e7cd53897090567 authored over 1 year ago
Centralise linting config in `.pre-commit-config.yaml` (#15210)

This makes it easier to maintain the configurations for the various
linting tools we use in CI....

21bf60374a3f9acf10df882aa36f4c3c4921a5a9 authored over 1 year ago
fix: typo fix for positional-only and keyword-only arguments (#15231)

Forgotten comma between parameters.

1d144f0c67b53907a627d6f70398beb0baadafaa authored over 1 year ago
Support for PEP 698 override decorator (#14609)

Closes #14072

This implements support for [PEP
698](https://peps.python.org/pep-0698/), whi...

c1fb57d38116adf6c1c1ea5c4b998cae597ec156 authored over 1 year ago
Mark ErrorCodes as serializable (#15218)

When starting mypy daemon, we pickle options. Error codes are part of
options and need to be pi...

16b5922c5e238e2a3fb07578390d0d6297e28747 authored over 1 year ago
Fix recursive type alias crash in make_simplified_union (#15216)

This is a recent regression

fe7007fef6f36384ba52de8ab5fb8b951179dc25 authored over 1 year ago
Use native ExpandTypeVisitor for expanding type aliases as well (#15209)

This used to be a source of code duplication, and also using the
"native" visitor will allow us...

35acb1bf69c990fcd89eeec32e35ae21f93c2d84 authored over 1 year ago
Move some utils that use get_proper_type away from types.py (#15204)

This is a pure refactor to improve code organization.

c54c226165925eb43ea55edad5c41c734deb1278 authored over 1 year ago
Update linters and python version for linting in CI (#15200)

x-ref: #15197

62835166774b2346f9f6afef61b9f7117c551ff2 authored over 1 year ago
Allow using expand_type during semantic analyzis (#15201)

This is another PR to prepare for variadic type aliases.

d671b318c2d27d993acb1015588dd47c9d42f643 authored over 1 year ago
Remove some not needed (and dangerous) uses of get_proper_type (#15198)

This is in preparation for support of variadic type aliases. This PR
should be a no-op from use...

3a1dc4cc8b6726232bc4a8875080412239adee2f authored over 1 year ago
stubgen: Fix missing total from TypedDict class (#15208)

Fixes #15195

ba8ae294e16c6ebc6a37c897a4618e27528c7ce7 authored over 1 year ago
Speed up make_simplified_union, fix recursive tuple crash (#15128)

Fixes #15192

The following code optimises make_simplified_union in the common case
that ther...

7832e1f4ec5edf5f814c91f323c2d4ccc3022603 authored over 1 year ago
Rename type alias helper with a misleading name (#15199)

bfc1a7631a48ecb3d2d0fedfe030b99a9e85e116 authored over 1 year ago
Synchronize test-requirements.txt and .pre-commit-config.yaml (#15197)

The two files got out of sync after #15167

b69060a0fa6d7fe93e0b81cf243632aa779deaa6 authored over 1 year ago
stubgen: Fix call-based namedtuple omitted from class bases (#14680)

Fixes #9901
Fixes #13662

Fix inheriting from a call-based `collections.namedtuple` /
`typin...

171e6f88bc3dc5f4cc05fde2a69ab2c64245c5f2 authored over 1 year ago
stubgen: Support TypedDict alternative syntax (#14682)

Fixes #14681

d710fdd9cf979ad0cf5758b069f4e5d488d13d12 authored over 1 year ago
Make dict expression inference more consistent (#15174)

Fixes #12977

IMO current dict expression inference logic is quite arbitrary: we only
take th...

541639e474085f18ed61527d97ba4620e4334e09 authored over 1 year ago
Simplify iterator usage (#15185)

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

fea5c9329e2442b2b77ee2408e307ccaa2c2fdfa authored over 1 year ago
Output distinct types when type names are ambiguous (#15184)

Fixes #12677

When assert_type fails, when the type of value examined and the
specified type ...

a8bd2737f6c315c27809ed77b29e9573edf3cdff authored over 1 year ago
Fix crash related to propagating type narrowing to nested functions (#15181)

See https://github.com/python/mypy/pull/15133#issuecomment-1533794642
for context.

13f35ad0915e70c2c299e2eb308968c86117132d authored over 1 year ago
Revert "Fix disappearing errors when re-running dmypy check (#14835)" (#15179)

This reverts commit a9ee618f3a941098b24156eb499db5684fcfc261.

The original fix doesn't work i...

d17b3edb5ce7867201102ef66f362849d9da3fd0 authored over 1 year ago
[PEP646] Add tests/fixes for callable star args behavior (#15069)

This adds tests for mixing star args with typevar tuples from PEP646. In
order to do this we ha...

61b9b9c75fd79090fcd127e5030f18342224e90b authored over 1 year ago
Propagate type narrowing to nested functions (#15133)

Fixes #2608.

Use the heuristic suggested in #2608 and allow narrowed types of
variables (but...

8c14cbaf344d2b464aa52eacf54e88792dee3c4a authored over 1 year ago
[pre-commit.ci] pre-commit autoupdate (#15167)

<!--pre-commit.ci start-->
updates:
- [github.com/pycqa/isort: 5.11.5 →
5.12.0](https://githu...

d71ece838c54488af0452cc9ccca5f2b3f2a8663 authored over 1 year ago
Do not show unused-ignore errors in unreachable code, and make it a real error code (#15164)

Fixes #8823

The issue above makes `--warn-unused-ignores` problematic for
cross-platform/cr...

61f6358306e82b2560bd98f376e1457c8ce4227b authored over 1 year ago
Fix spurious errors on builtins.open (#15161)

Fixes #14796

66602fcde3468d7a284aa89cb280d448f454e07b authored over 1 year ago
Fix crash in dataclass protocol with self attribute assignment (#15157)

Fix #15004

FWIW I don't think dataclass protocols make much sense, but we
definitely should...

b5107a98aa70e2cb33c79fb678f4205aa4539505 authored over 1 year ago