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

Allow super() for mixin protocols (#14082)

Fixes #12344

FWIW this is unsafe (since we don't know where the mixin will appear in
the MR...

49316f9fb8ccddc3941a1fbe378e4c96e929152f authored about 2 years ago
Remove `get_line()` and `get_column()` functions (#14071)

When I was working on a different PR for Mypy, I came across these
functions:

```python
...

f84f00a2738db3a541861afb7a0f67fb050095aa authored about 2 years ago
Allow class variable as implementation for read only attribute (#14081)

Fixes #10289

Unless I am missing something, this indeed looks safe, so I am going to
allow t...

6a7c7cdebdad318845959adfaca93c789b250a2e authored about 2 years ago
Fix crash on nested generic callable (#14093)

Fixes #10244
Fixes #13515

This fixes only the crash part, I am going to fix also the embarr...

7d0d1d9d505869d55ee71e370941a8a47122087e authored about 2 years ago
Prevent warnings from causing dmypy to fail (#14102)

Fixes: #14101

This prevents non-error messages (e.g. warnings) from causing dmypy to
return ...

e01359d39978a0b2c132533c00567a4c264116ed authored about 2 years ago
Correctly process nested definitions in astmerge (#14104)

Fixes #12744

The fix is straightforward. Current logic can produce a random mix of
old and n...

0d2a954a20f239cde5f958b3e757ee4daab0d8b0 authored about 2 years ago
Delete unused symbol node (#14107)

IIRC `ImportedName` was used by old semantic analyzer, that is long gone
now.

6cdee7b9c568e966104c05b7a27ffe43083a1310 authored about 2 years ago
Add support for Self type (#14041)

Ref #12840
Fixes #11871
Fixes #14089

This is an alternative implementation to two existing...

77dd4b4df5b8bcd716352144feeb78862427f4dd authored about 2 years ago
Fix crashes with unpacking SyntaxError (#11499)

In general, mypy doesn't promise to be able to check the remainder of
your code in the presence...

e0a37fa2d9654fae61799c09b5c84630309f8735 authored about 2 years ago
Don't consider a branch unreachable if there is possible promotion (#14077)

Fixes #14030

FWIW this looks like an acceptable compromise after discussions in the
issue. ...

dd0503e28d9f3dbfa8fa74e5bfdb4ce438646a80 authored about 2 years ago
Fix crash on partial type inference within a lambda (#14087)

Fixes #9654

Seems to be quite straightforward. Erased types should never be stored
on variab...

cf59b82996db6bbe5c6535f338ba1fac22d67975 authored about 2 years ago
Support additinal attributes in callback protocols (#14084)

Fixes https://github.com/python/mypy/issues/10976
Fixes https://github.com/python/mypy/issues/1...

57ce73d4a39d3293eaac43c7a950e2c1ac30e2c9 authored about 2 years ago
Delete Python 2 test fixtures (#14083)

It looks like these are not used anymore (we will see if tests pass).

47a435f38d96892b1f6a1fe543b0abe3ccca9c53 authored about 2 years ago
Add error-code for `truthy-iterable` (#13762)

`Iterable` does not implement `__len__`, so passing a `Generator` would
always evaluate to `tru...

33d2b894bd2daff5e17074a37df9bdfe0a6c5518 authored about 2 years ago
Fix crash with function redefinition (#14064)

Fixes #14027 (issue was surfaced by #13509)

67855fab376c3c2d68bcf0940b242c9b71a98156 authored about 2 years ago
Fix another crash with report generation on namespace packages (#14063)

Fixes #14046. Similar to #13733

Best reviewed with hide whitespace.

f78d1fdc154d507353b34e7ea2037ef68de4e6fc authored about 2 years ago
Update --no-warn-no-return docs for empty body changes (#14065)

Fixes #14048

Co-authored-by: Jelle Zijlstra <[email protected]>

70e544b1fb848448fc702e95a84edfa5ab628d3c authored about 2 years ago
Fix incompatible overrides of overloaded methods in concrete subclasses (#14017)

Fixes #14002

a48dd5ad7ff820da7ea1e947008fff2865e2296a authored about 2 years ago
Simplify boolean return logic in various places (#14012)

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

b18281c857a3e089740b6c6c03ff52a529c1b0ba authored about 2 years ago
Don't ignore errors in files passed on the command line (#14060)

#13768 had a bug so that errors were sometimes silenced in files that
were under a directory in...

5cc14390337f28e6f90efaf0ad5c4b1d322a8638 authored about 2 years ago
[mypyc] Use tabs instead of spaces in emitted C code (#14016)

By using tabs instead of spaces for indentation in the emitted C code we
are able to reduce the...

dbcbb3f5c3ef791c98088da0bd1dfa6cbf51f301 authored about 2 years ago
Fix crash on inference with recursive alias to recursive instance (#14038)

Fixes #14031

It turns out premature optimization is the root of all evil. (It turns
out thi...

fa22a49ef1154285d4f251086f85cadf16e54cd9 authored about 2 years ago
Filter out wasm32 wheel in upload-pypi.py (#14035)

Tried to make it in a way such that we can add more rules for platforms
we want to filter out i...

7465abd3d2fe4211a8aaa9453b402fea60071561 authored about 2 years ago
Fix new style union syntax in type aliases (#14008)

Fix Python 3.10 `|` union syntax in type aliases, when one of
the operands is a type alias or a...

39d35cdee1bd02a6fb071334273e1c1fb0893066 authored about 2 years ago
Fix crash with PartialTypes and the enum plugin (#14021)

Fixes #12109.

The original issue reported that the bug had to do with the use of the
`--foll...

d2a3e667bf0bedb19a1e88baaf7f3ffebc12c74a authored about 2 years ago
Add support for exception groups and except* (#14020)

Ref #12840

It looks like from the point of view of type checking support is quite
easy. Myp...

e8de6d1fc5c908e738f69494de38ea191fb12e60 authored about 2 years ago
Fix and optimise overload compatibility checking (#14018)

Discovered as part of #14017

807da2675bfdc7ec434f8d5677c13722a555e8da authored about 2 years ago
Fix crash on nested unions in recursive types (#14007)

Fixes #14000

This will introduce some minor perf penalty, but only for code that
actually u...

331b170c5d0e55a11a78a7f60fad5a8a8b5d6f2c authored over 2 years ago
running_mypy.rst: Fix typo (#14004)

Introduced in #14003

796068d06a0ab171d22f7be555c28dfad57db433 authored over 2 years ago
Clarify docs surrounding install-types (#14003)

See #13681

More clearly point out the speed cost and the alternative of installing
stub pack...

428b1723285bcb44b74d4986105d631d41c25e97 authored over 2 years ago
Add `__match_args__` to node types (#13330)

Closes #13243.

For the most part, in order to determine which fields where worth
pattern mat...

11a040d418b95d1956e90b734ac3e832e119090d authored over 2 years ago
Fix Mypyc not compiling on Arch Linux (#13978)

Closes https://github.com/mypyc/mypyc/issues/956

This was originally a part of #13953, see
h...

bc78eb56eb93f75be749c02860ccecbf66022a6f authored over 2 years ago
[mypyc] fix for typeshed changes to Collection (#13994)

451ae0e4600af848b02390495e4317b997d51032 authored over 2 years ago
[mypyc] allow use of enum.Enum (#13995)

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

77a92b598bbfa129613d16e17b5e00ad7af9d1ab authored over 2 years ago
Better story for import redefinitions (#13969)

This changes our importing logic to be more consistent and to treat
import statements more like...

a4da89e0543ee0d213b30216c9e15a5d00fcd578 authored over 2 years ago
Make TryStar not crash (#13991)

0457d33609ef8dd7d7e32ff18dd39da3e4ecc3fc authored over 2 years ago
checker.py: Remove unneeded `cast()` (#13984)

8b825472a02f0a30419c02e285ba931107a42959 authored over 2 years ago
ipc: Remove some typeshed-related TODOs (#13982)

As per the TODO comments, this PR removes some unnecessary `assert`s in
`mypy/ipc.py`. When the...

fed90caa47e61ccaa4b9aac44f2d7545bcf1a955 authored over 2 years ago
Typeshed branch 'master' was renamed to 'main' (#13980)

There aren't really any big changes required over on mypy's side (I was
worried there would be ...

32c26f208732097c0fcc3d4cf0fb2cd9fbd1a99b authored over 2 years ago
Update version on master for next release (#13974)

Next release is 1.0 so also update the comments.
NOTE: Should we go with 1.0 or 1.0.0? I chose ...

55d0adf17a15ddbd0a8e9fb9d27f848117522a17 authored over 2 years ago
Preserve (some) implicitly exported types (#13967)

Fixes some of #13965, fixes #12749

We also need to modify attribute access logic (this is the...

8c691242d6326dc9e1c8521e18fd13eaf15a3b49 authored over 2 years ago
Fix crash with malformed TypedDicts and disllow-any-expr (#13963)

Fixes #13066

During the semanal phase, mypy opts to ignore and skip processing any
malformed...

7569d88d0d650be73070c2536ddc3746d61237dd authored over 2 years ago
Add another invalid ParamSpec test case (#13968)

Don't think there's a test case corresponding to the issue in #13966

758f43c5d27eda339fd340a7b68bce59b3684254 authored over 2 years ago
Warn on invalid `*args` and `**kwargs` with `ParamSpec` (#13892)

Closes #13890

41c160231bb53cb9895044506c2b08aba692922b authored over 2 years ago
Revert sum literal changes on an ongoing basis (#13962)

Makes sure we continue to cherry pick
https://github.com/python/mypy/pull/13961

40d04a5af0b658ae5ef6181c7f3d89a984fe3547 authored over 2 years ago
Revert sum literal integer change (#13961)

This is allegedly causing large performance problems, see 13821

typeshed/8231 had zero hits o...

5319fa34a8004c1568bb6f032a07b8b14cc95bed authored over 2 years ago
Add hidden options to disable bytes promotion (#13952)

It might be useful to run mypy_primer without promotions in typeshed.
This would give us more c...

2d70ac0b33b448d5ef51c0856571068dd0754af6 authored over 2 years ago
Add type inference for `dict.keys` membership (#13372)

Closes #13360

507fc5cf256bd4d1749a6109ef45c8462dd82185 authored over 2 years ago
[mypyc] Fix ircheck if register is initialized through LoadAddress (#13944)

It's okay to take an address of a register, pass it to a function that
initializes the register...

ec6d9d974b5ae7b985fd5c1585d54eb0f86752f5 authored over 2 years ago
Use `3.11` instead of `3.11-dev` (#13945)

8ef701d03baeb2d714bd40f94d0037699c9face2 authored over 2 years ago
[mypyc] Fix glue methods with native int types (#13939)

This fixes handling of bitmap arguments used to track default values of
arguments with native i...

ec149da93d7a5557d0bb2f2955f5d88a684148a1 authored over 2 years ago
update black and flake8-bugbear (#13938)

bump these two dependencies.

Also:
- add all supported python versions to black config
- ch...

cf705d7ea06977fec72db06b13b27406816038ee authored over 2 years ago
[mypyc] Move glue method test cases into a dedicated file (#13937)

This doesn't change any test cases.

81ea3633f7796b6365143e6b566d50ca2a94f241 authored over 2 years ago
Always mention explicit export when relevant (#13925)

Related to #13917 and #13908. This handles situations involving
per-module re-exports correctly...

8d5b64140c5fe43a2e437e44a6bc3dfdb2b6948a authored over 2 years ago
[docs] add clearer warning about stubtest code execution (#13927)

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

ace0f3219b8fef315d5bf6d86eff4ef225306053 authored over 2 years ago
Support match statement in partially defined check (#13860)

This adds support for match statements for the partially-defined
variables check. This should c...

37044dddd0b7b182c64cc23c6045b809e6c9e99f authored over 2 years ago
Remove `contextlib` plugin from default (#13923)

It is no longer needed. `typeshed` defines `contextlib.contextmanager`
and `contextlib.asynccon...

3108669b0c1d57a6eecf84002fa1cf240449dba6 authored over 2 years ago
Update `extending_mypy.rst` docs (#13924)

Changes:
- Removes notes about old semantic analyzer, it is long gone
- Removes outdated `cont...

3cf7ea16e3f4085fb5ce7b97ca5d6b7dba14cd12 authored over 2 years ago
Mention implicit export on missing attribute access (#13917)

Also only suggest public API for attribute access suggestions

Fixes #13908

Accomplishes a ...

9bba3773b004e989df59950bd8e40d09278a7e8d authored over 2 years ago
Improve cheat sheet (#13873)

- Mention PEP 604 unions
- Separate out the 3.8 stuff to keep things more readable
- Remove me...

4ccfca162184ddbc9139f7a3abd72ce7139a2ec3 authored over 2 years ago
[stubgen] Add known return types to magic methods (#13909)

This is based on the idea of https://github.com/JelleZijlstra/autotyping
Other magic methods ca...

045ea8c184972d6faa4239fc0a7875929608e77f authored over 2 years ago
Fix __set__ to __get__ in messages (#13913)

We're dealing with the get descriptor here but calling it `__set__`,
probably a copy-paste from...

874a28f81ff5c2f3c8a37ce7334f98741d2edc6a authored over 2 years ago
Improve getting started docs (#13875)

- Show complete code examples for dynamic typing
- Make clearer that the insides of dynamically...

a4127389bab604830f0e657a06b43a5d4c80d3e1 authored over 2 years ago
Forbid unpacking multiple times in tuples (#13888)

This covers some cases from the PEP646 documentation which says we
should error when there are ...

6f80fe04f2f289613d3607518fded4fa9d3d2213 authored over 2 years ago
Implement basic *args support for variadic generics (#13889)

This implements the most basic support for the *args feature but various
edge cases are not han...

c810a9c8f42dd54728b09f42dd4e335bb05660dd authored over 2 years ago
[mypyc] Fix native int default args in __init__ (#13910)

Avoid creating duplicate bitmap arguments for the constructor. These
would generate broken C wi...

f12faae9291fcdc6d22f29996d6acdd80fcf8cae authored over 2 years ago
Change `testParamSpecApplyConcatenateTwice` test (#13907)

It was very confusing, because `int` and `str` were messed up.

5e1e26eba15b43449bdce4010bf16d160d3ec505 authored over 2 years ago
Sync typeshed (#13900)

Sync typeshed

Source commit:

https://github.com/python/typeshed/commit/51e18a860129b792123...

abc9d155ffbd9ea160eec0b57c450cdf7e53ce39 authored over 2 years ago
sync_typeshed: add fetch-depth: 0 (#13899)

Otherwise the commit it wants to cherry-pick doesn't exist:
https://github.com/python/mypy/acti...

d528bf2e79cf263653b9a6e70e80ce8a033cc01a authored over 2 years ago
Return 0 if there are only notes and no errors (#13879)

Fixes #10013

See https://github.com/python/mypy/pull/13851#issuecomment-1274345759
for motiv...

201d1161fc501dfa02463c99994b933ec71e7cb9 authored over 2 years ago
Add error-code for `truthy-function` (#13686)

A separate error code for `truthy-function` so it can be enabled by default.

Closes #12621

...

b3d94dc3d834dd4916d568a00d344cc610deb687 authored over 2 years ago
Fix quotes for upload-pypi version check (#13887)

After we started using black upload-pypi broke because we switched the
style of quotes. This re...

ea606b4cbcaeba5bb4947bac2a96083ae3edf268 authored over 2 years ago
Extend support for tuple subtyping with typevar tuples (#13718)

This adds a new Pep646 test case which demonstrates that like with the
constraints from PR #137...

0d07c90e53a97212f8efce9947864a53695ac204 authored over 2 years ago
Show error codes for some notes (#13880)

This will hint people affected by #13851 what to do to silence this. I
am not doing it for all ...

9227bceb629a1b566a60cbdd09fef6731f7bfcb1 authored over 2 years ago
[mypyc] Fix C errors about shifting negative integers (#13876)

Fixes #13819.

7cc024a1096324a5979890948218baa61e26bdd4 authored over 2 years ago
Handle attrs' __attrs_init__ method (#13865)

If an `attrs` class does not generate the `__init__` method for whatever
reason, the method is ...

319d7457432b3cd984c49a3e8559e3cf54254d44 authored over 2 years ago
Suggest to use a protocol instead of a module (#13861)

68ab69c8eab2d3b8df2f9a49071161328c6b5039 authored over 2 years ago
Workflow to automatically sync typeshed (#13845)

Resolves #13812

186876c55422d15fc1e2d643f78b35116ae8a87f authored over 2 years ago
Use mypyc for Python 3.11 tests in CI (#13869)

This will give us more confidence that compiled mypy works on 3.11.

efd713a507a8e239f0eaf7d9b4ce5d1fcc927509 authored over 2 years ago
[mypyc] Fix command-line tests on Python 3.11 (#13867)

This fixes the testErrorOutput and testCompileMypyc test cases by
setting up the module search ...

447ed2becf9b93568e3628884fd9f4ebad559f8b authored over 2 years ago
Remove Python 3.6 specific filelock requirement (#13866)

We no longer support Python 3.6.

628a5114519ccf1755a672d44a3d24a90eb1f9b8 authored over 2 years ago
Fix crash on missing indirect dependencies (#13847)

Fixes #13825

We add also types encountered in locally defined symbols, not just
expressions....

1eaf4c70c0b83c3f0f639e3c53daaf3872bea5b0 authored over 2 years ago
Add Python 3.11 classifier (#13857)

Since all tests pass in CI and we build wheels

2f08e40fe999b41274a2427bbb5acc9b31f764d7 authored over 2 years ago
Add a note on variable annotation within unchecked function (#13851)

Closes #3948

This however gives a note instead of an error, so that type checking
result wil...

fe1e571fcc266639f1a8c7959918c1638ef64271 authored over 2 years ago
Fix minor issues with keywords Unpack (#13854)

This fixes couple issues discovered in
https://github.com/python/mypy/pull/13790:
* A crash on...

56258a69f822e227062ce8a5b8728f98666a1bb9 authored over 2 years ago
Temporarily put back --enable-recursive-aliases (as depreceated) (#13852)

The motivation here is to not penalize people who try early features
with breaking their CI. We...

0c4b76351a28bef89069dfc1cb85a860a0a1f3b9 authored over 2 years ago
Allow enabling individual experimental features (#13790)

Ref #13685

Co-authored-by: Nikita Sobolev <[email protected]>

b79a20ab61b373ce531cd20ff66d853141fb0fe9 authored over 2 years ago
Fix isort skip config (#13849)

Our current isort config doesn't fully work for the pre-commit hook.
Whereas in tox isort is ca...

edf83f39e96e903bfb053ada696e92b2cefe898e authored over 2 years ago
stubtest: catch SyntaxError from inspect.getsourcelines (#13848)

Fixes #13822

1fbbe91c84ca1d26168d4d5eaec8888222e2e3c6 authored over 2 years ago
Cancel primer for old commits on PRs (#13846)

366b7e1a86df22f9a1ef13a12147f0ef2e6219e1 authored over 2 years ago
Make join of recursive types more robust (#13808)

Fixes #13795

Calculating tuple fallbacks on the fly creates a cycle between joins and
subtyp...

dbe9a88e04d4bd6b9e4ddf23326c841416053cd4 authored over 2 years ago
Remove typed_ast tests requirement (#13840)

`typed_ast` is not directly used in tests, and is never imported on
Python 3.8+.
Its requireme...

9f3912012a7f33f87895532e227b3ec941d78f72 authored over 2 years ago
Run tests on Python 3.11 as required (#13837)

For now we run non-compiled version. (I tried compiling mypy locally and
it failed with couple ...

d081f76d731ae024390f43318961ea2c367d58ca authored over 2 years ago
Opt out from the managed dict for compiled classes on Python 3.11 (#13830)

This fixes the last failing test on Python 3.11

1a8e6c8ed9fca2125e5619f2fb81a21517c2b2a7 authored over 2 years ago
Sync typeshed (#13831)

Source commit:

https://github.com/python/typeshed/commit/8b41b1337b34529f3c328d4167d8c902c36f...

589ad1c17eeb220a41ba41425b61b8593f8bc42d authored over 2 years ago
Fall back to FORCE_COLOR environment variable if MYPY_FORCE_COLOR is not present (#13814)

Fixes #13806

This PR adds support for a FORCE_COLOR environment variable. If both
MYPY_FORCE...

0cab54432a1df91a9b71637b773bcbb9772a6b59 authored over 2 years ago
Support package and module in config file (#13404)

Closes #10728

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

9033bc5373b12dd84c239f8d3a4cbf086fa3d8dc authored over 2 years ago
Move an import to avoid cyclic imports (#13809)

This should help people who need to `import mypy.reports` directly, see
https://github.com/pyth...

78706b6e19439349b9b50a631d3d3ccbfa6e551e authored over 2 years ago
docs: Improve "Precise typing of alternative constructors" example

See microsoft/pyright#4001.

- TypeVar bounds that contain TypeVars are not well-specified and...

dc5c299aa190949f2300b163ccc10257a779006d authored over 2 years ago
Ignore promotions when simplifying unions (#13781)

Fixes #13760
Fixes #6060
Fixes #12824

This is a right thing to do, but let's what `mypy_pr...

08c566cfa8a3e9cbf0bbad1db3cdcdff7d1ad2f2 authored over 2 years ago