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

Remove unnecessary comment line (#13793)

Signed-off-by: jinzewu <[email protected]>

c5db2b60219f54726839442080d02e5e1773d3b4 authored over 2 years ago
Fix module and protocol subtyping, module hasattr (#13778)

Fixes
https://github.com/python/mypy/issues/13771#issuecomment-1262749908

34f5cec15e4e58857098e07145b3f772fa57c314 authored over 2 years ago
Fix one mypyc test case on Python 3.11 (#13787)

f85dfa1b2533621094bc45b4263ea41fd3bc2e39 authored over 2 years ago
Use a dedicated error code for abstract type object type error (#13785)

Ref #4717

This will allow people who consider this check too strict to opt-out
easily using...

8345d225608c16d6e610d16b6ea302bc42fe9a8c authored over 2 years ago
Restore Type vs Callable special-casing that was broken in refactoring (#13784)

Fixes https://github.com/python/mypy/issues/13756

55ee0865ef21c94a361737dccac1e71dd7d36c19 authored over 2 years ago
Avoid deprecated `importlib.resources.path` function (#13783)

The
[`importlib.resources.path`](https://docs.python.org/3.11/library/importlib.resources.html#...

46aee5a97d9c9365906d0526b78d786b19ba1fc6 authored over 2 years ago
Add install-types extra that depends on pip (#13739)

Fixes #13580

24aab8eccfff97eaa13e3464c2f0513e009313c2 authored over 2 years ago
Add test case for missing TypedDict TypeVar scope frame (#13764)

This is a small follow-up to #13678 and #13755.

In the former diff, I added a TypeVar scope f...

053ff274876ecd47f8eb191478a91a94d717f1ff authored over 2 years ago
Preserve file order of messages during successive daemon runs (#13780)

This fixes an annoyance where the messages got reshuffled between daemon
runs.

Also if there...

efdda88eb50b025318e2f1952c7f2dd9aa36e473 authored over 2 years ago
Improve error message for implicitly abstract functions (#13776)

Fixes #13770

78190856b09a1eca923f9620ba7af1325b06e33e authored over 2 years ago
Improve error message for `--strict-concatenate` (#13777)

Resolves #13711, resolves #13429

a1eeddb95c5701dbc89ea04574ab929aeba10dad authored over 2 years ago
Support debug prints in mypy daemon (#13769)

Capture stdout in daemon and display it in the client. This makes it
possible to use debug prin...

a68f0a531392eef894a03597240afabbc745c0cd authored over 2 years ago
Silence errors from third party packages in daemon (#13768)

If daemon was running and additional third party code was installed,
mypy daemon would report e...

00ca6bf127fcdca00fbe6641454d3c0535b00f4f authored over 2 years ago
Flip the default for recursive aliases flag (#13516)

I don't think we need to wait long time for this. As soon as next
release goes out, I think we ...

ddd917767aa8135f3b1aeef47b0bb0616a4b63fb authored over 2 years ago
Always re-process annotations refering to an alias on update (#13759)

This should fix a crash discovered by `mypy_primer` in
https://github.com/python/mypy/pull/1351...

0f4e0fb1e55fbff93039d0836aa57c05c11021db authored over 2 years ago
Handle empty bodies safely (#13729)

Fixes #2350

This essentially re-applies https://github.com/python/mypy/pull/8111
modulo vari...

ef22444e0e818ce7804042689b6af78d833e8a5e authored over 2 years ago
Add error code to missed invalid Literal case (#13763)

d560570c6f768d8e49062dc7c1011bc03cd401f9 authored over 2 years ago
Suggest codemod for `--no-implicit-optional` (#13747)

3015abf582994c63c048d2035c772d7463f879dc authored over 2 years ago
Respect per-module follow_import for empty folders (#13758)

Fixes #13757

e898652e64ecb58aa6f4341e626649c2dabb37e2 authored over 2 years ago
Allow recursive aliases at class scope (#13754)

As `mypy_primer` in https://github.com/python/mypy/pull/13516 shows,
some people actually use t...

25621406afd230104c6ccf8f884cb13456ea9243 authored over 2 years ago
Reorder sections in running_mypy (#13738)

See #13681

"Mapping file paths to modules" belongs next to "Specifying code to be
checked". ...

9783b46a0062b6acfb8ba58e349e811873fc13f2 authored over 2 years ago
Show error codes by default (#13542)

Part of the effort to nudge users into using specific type ignores. See
#13541

This PR enabl...

da43c912bf43855aed82ff25c264c1ca9431ce10 authored over 2 years ago
Talk about user defined protocols first (#13737)

00d547f266e617c16ea8f309ce27a9fabc466f36 authored over 2 years ago
Treat __dataclass_fields__ as ClassVar (#13721)

063f05b4cb5fc1386fe2ef12def67e1964173597 authored over 2 years ago
Fix CI (#13748)

It was failing:
https://github.com/python/mypy/actions/runs/3133286021/jobs/5086495727

cd4bf12cca01ba9355b20de9c9511ca05e27b531 authored over 2 years ago
Make --namespace-packages the default (#9636)

aa947e2310b18925fad38c982a48109c4dcf1eed authored over 2 years ago
Use --no-implicit-optional by default (#13401)

Fixes #9091

This brings us in line with the PEP 484 updates in 2018

027c58a99cc71eadfb9719519b2c7e89e43b926b authored over 2 years ago
Fix crash with report generation on namespace packages (#13733)

Fixes #11234

ab3b98fad942bb3f13f3a8f94c447433b8876ae2 authored over 2 years ago
Remove use of LiteralString in builtins (#13743)

780534b13722b7b0422178c049a1cbbf4ea4255b authored over 2 years ago
Sync typeshed (#13742)

Source commit:

https://github.com/python/typeshed/commit/9abe56a19a42fd1e225a2b8d8b9ab8d830d5...

ffd78df93d058962f9a2007f54412783bc760550 authored over 2 years ago
Better diagnostic for conditional function mismatch (#13604)

Fixes #10575

50ac875cbf26705cddabaacf144065b733fc7ccf authored over 2 years ago
Fix unsound variance (#13714)

Fixes https://github.com/python/mypy/issues/13713, fixes
https://github.com/python/mypy/issues/...

a4c32d174c941832ae6d707e4e88bd1362f3e8df authored over 2 years ago
Fix crash in match statement with unmatchable ClassPattern (#13731)

Fixes #12886

`contract_starred_pattern_types` and `expand_starred_pattern_types` are
sort of...

176b0525aadd2c8466a0bba088ed3cdaa930594c authored over 2 years ago
Suggest using upper bound for unbound tvar (#13730)

Also don't complain about other TypeVarLikeTypes

Implements
https://github.com/python/mypy/p...

6a4c2c843e5f3c743a855022ca9cdce1089c8559 authored over 2 years ago
Fix crash on match statement with value restricted TypeVar (#13728)

Fixes #13727, fixes #12448, fixes #13213

f56a0715d43eb2572e317793030c0082ae581be1 authored over 2 years ago
Attrs/tweak magic attribute (#13522)

This is an attempt to fix the attrs magic attribute handling.

The attrs magic attribute funct...

320f3687a81055f454205f0bce62010de21dc284 authored over 2 years ago
Update type inference and annotations (#13736)

See #13681.

Prefer mypy: ignore-errors over module level type: ignore, which is
surprising. ...

2d903e883932eeff134e4782fe09701a49c04e9f authored over 2 years ago
Update getting started docs (#13734)

See #13681. I'd like to make bigger changes to this page, but still
thinking them through

5f21936cdc79383c3e0ce46b0462f5d8181f651d authored over 2 years ago
Fix joining a function against metaclass-using object constructors (#13648)

This pull request fixes #9838.

It turns out that when an object is using a metaclass, it uses...

f5ce4ee6ca7e2d8bb1cde8a2b49865f53bbacff5 authored over 2 years ago
Fix crash with generic class definition in function (#13678)

Fixes #12112.

The reason why mypy was crashing with a "Must not defer during final
iteration...

50944603afef1522b0777a26821de04859186a1b authored over 2 years ago
Update PR template (#13723)

The old one was long and weirdly incomplete. It had placeholder text
like "link to instructions".

a3a5d73f7407f9565abcfd04689870e7c992f833 authored over 2 years ago
Mention mypy playground in bug template (#13724)

Meant to do this in https://github.com/python/mypy/pull/13722

dc6714edcf8ce46eccfff9e9448c43f5a875496d authored over 2 years ago
stubgenc: Introduce an object-oriented system for extracting function signatures (#13473)

Note: This change is part of a series of upcoming MRs to improve
`stubgenc`.

`stubgenc` trie...

be63842c316c7a223e1c4bf841bcb87a6e5f131b authored over 2 years ago
Update issue template (#13722)

Suggest providing a link to the project to help fuel mypy_primer. Let
Github wrap text. Phrase ...

21f2d4fbcfc1984f0056c18207d7c0cf406ca35c authored over 2 years ago
Tweak constraints handling for splitting typevartuples (#13716)

The existing logic for splitting mapped & template into prefix, middle,
and suffix does not han...

06aefc6e860796a651b5114bd3ab1104b72db6d0 authored over 2 years ago
Suggest additional types-* packages from typeshed (#13698)

Now we have suggestions for almost all the currently available
third-party packages in typeshed...

a677f49420871679f80c6952c228ae0d64691551 authored over 2 years ago
Fix typevar tuple handling to expect unpack in class def (#13630)

Originally this PR was intended to add some test cases from PEP646.
However it became immediate...

0a720edb1489af6da63f0731cbc66263598a5a5d authored over 2 years ago
Use the same language in the docs intro and README (#13677)

6a5019272449dc2a629838c549941570b57e1ac4 authored over 2 years ago
Mention files confval in "specifying code to check" (#13682)

See #13681

e40d214106d4d8c7c943546a686fd5d11da3aff4 authored over 2 years ago
Update runtime_troubles docs (#13680)

See #13681

PEP 563 is in limbo, so fix incorrect statements

Mention what type comments are...

f8d6e7d87df4583440bbe6eaccb7404bc3028b68 authored over 2 years ago
Major update to "using mypy with existing codebase" (#13683)

See #13681

In particular, it's really common to want to make progress towards
`--strict`, an...

d53f0aecbeb37793c285b02f8215585b475dc9b1 authored over 2 years ago
Update cheat sheet docs (#13679)

See #13681

e4edea31a2f87f08189ac197de820a8214d55876 authored over 2 years ago
Use consistent capitalization of `TypeVar` (#13687)

Changed `Typevar` -> `TypeVar` in the error message from #13166.

I was testing the mypy 0.980...

1d4395f14a0b2a923dd24e881887ff9360ec50fa authored over 2 years ago
Support building mypycified mypy with PEP517 interface (#13445)

d619c783d4713a13083a1a6e8020075948baceb2 authored over 2 years ago
Don't run test suite on 32bit Windows (#13672)

I don't think testing the different architecture gains us anything, and
[we don't build mypyc c...

330f79b67faeeb7b0abeab0807fc0ca988178cf6 authored over 2 years ago
[mypyc] Add support for building mypyc code on WASM (#13446)

### Description

This PR tweaks two things about how mypyc generates and builds C code to
bet...

11be37863683745ec2e3df4c15440cb1c7ba44d4 authored over 2 years ago
stubtest: Detect abstract properties mismatches (#13647)

Closes https://github.com/python/mypy/issues/13646

Co-authored-by: Shantanu <12621235+hauntsa...

7c14feedd2a6889d9eab8b0ac8dc8aab630bbed3 authored over 2 years ago
Update pos-only unit tests for Python 3.10.7 (#13660)

The CI has started to sporadically fail depending on whether 3.10.6 is
picked up by GitHub Acti...

1df4ac2314bdc2b07f1f48836a4dd60cfb3a0142 authored over 2 years ago
[mypyc] Infer native int index type from range over native int (#13640)

Previously the for index variable would always be inferred a plain `int`
when iterating over ra...

a784b486e3f457bd5cb3f71d0a8c7c662c296ead authored over 2 years ago
Bump development version. (#13659)

c306f6e5afc5b6d40b074705616d1c867866285b authored over 2 years ago
Handle WithStmt when checking for partially defined vars (#13657)

Add support for `WithStmt` nodes for the partially defined check.

9daf79af70fe962f50b88dd75a6fdc591b96b339 authored over 2 years ago
Handle DictComp when checking for partially defined vars (#13655)

Description

Adds support for `DictionaryComprehension` nodes for the partially
defined check.

fdc135c93cc070a3b4d0feeca6ecdb034d6242e9 authored over 2 years ago
Handle AssignmentExpr when checking for partially defined vars (#13653)

### Description
Adds support for `AssignmentExpr` nodes for the partially defined check.

89b85157203453dfee57dee4c4ca2626e21dad23 authored over 2 years ago
Report partially undefined variables only on first occurrence (#13651)

Generating errors after first occurrence is pure noise -- if the
variable is actually undefined...

7918ac7e70770922d3b0558de5aa5a39c6a554af authored over 2 years ago
Fix stubtest custom_typeshed_dir regression (#13656)

Fixes #13654, caused by #13629

a5f218f564ceea35a5dfaab442c8276beae70287 authored over 2 years ago
Add support for jump statements in partially defined vars check (#13632)

This builds on #13601 to add support for statements like `continue`,
`break`, `return`, `raise`...

216a45bd046097642a4ff3ba8ec03404b5c377ac authored over 2 years ago
refactor: Use `@overload` for `expand_type` (#13641)

Removing a bunch of `TODO` items.

0f17aff06ac1c05c442ba989e23655a2c6adbfbf authored over 2 years ago
[mypyc] Generate efficient code for (some) conversions i64(x) and i32(x) (#13621)

These are now optimized for i32, i64 and int arguments.

`i32(x)` truncates from `i64`, but do...

c8e5278a53018823556dc392263415058f9eec12 authored over 2 years ago
Better errors for missing imports (#13636)

Fixes #13633

- Incompatible stubs aren't really a thing (that is visible to mypy at
module f...

8147b0c55e0feb27360652b1f764e5a588bda322 authored over 2 years ago
Treat `Any` metaclass the same as `Any` base class (#13605)

Closes #13599

520b83e40efb2400e3679ec97bd620c3c63560c0 authored over 2 years ago
Fix custom typeshed dir handling by is_typeshed_file() (#13629)

This was broken by https://github.com/python/mypy/pull/13155, fix is
straightforward, pass cust...

c0372cc318dc35b25d4fe524b59f20b1244382a3 authored over 2 years ago
Output a note about use of `assert_type` in untyped functions (#13626)

`reveal_type` provides a useful note to users that it will always reveal
`Any` within an unchec...

d8652b4f641c7d9dd0b62b7b211b8c38b9c80495 authored over 2 years ago
Implement tuple cases for typevartuple constraints (#13586)

This implements cases for homogenous and non-homogenous tuples in the
supertype of branch for c...

b265daa90c6eec0b9eb2e26a64663d71c68a7cff authored over 2 years ago
Implement foundation for detecting partially defined vars (#13601)

This diff lays the foundation for detecting partially defined variables.
Think of the following...

82a97f7add513d849876cc129e67b65bd4bc4f65 authored over 2 years ago
Allow `@final` on `TypedDict` (#13557)

Allow a `TypedDict` to be decorated with `@final`. Like a regular class,
mypy will emit an erro...

4de0caa3c2b30a18dcb9fc4d4f07ac65e6e201cd authored over 2 years ago
typeanal: add error codes for many errors (#13550)

cc59b563ce63d80c61ff8ddcbb410fd1f1dbcdcc authored over 2 years ago
`MYPYPATH`: Improve docs for those running on Windows (#13622)

On Windows, `MYPYPATH` needs to be a _semicolon_-separated list of
paths, rather than a _colon_...

91a6613a2863346ba271b83df1942ddf95f8c06a authored over 2 years ago
Fix type inference in pattern matching by positional argument (#13618)

Oh, this was very interesting.
During the debug sessions I learned a lot about how pattern matc...

b031f1c04e1ee4331e4d6957c7a9b727293328a9 authored over 2 years ago
[mypyc] Support undefined locals with native int types (#13616)

There's no reserved value we can use to track if a local variable with
a native int type hasn't...

80dfb36b292f279dcbfb879e82851d2a8f8a2b63 authored over 2 years ago
checker: simplify check_simple_assignment error handling (#13549)

Let it only take an ErrorMessage. The default error now gets an error
code as well, which close...

88aed94ae3de2542491f6cd65d1236c4f0cdedb1 authored over 2 years ago
[mypyc] Properly support native int argument defaults (#13577)

Since native ints can't have a dedicated reserved value to mark a
missing argument, use extra b...

c97d7e346e2871eb3e54a0bca47abd191d30ac48 authored over 2 years ago
Ensure we always infer a valid fallback type for lambda callables (#13576)

Fixes #9234

This diff fixes a bug in `infer_lambda_type_using_context` where it blindly trust...

ad56164690e58d3d71b59f7558418dd058b1951f authored over 2 years ago
Fix crash when using member type aliases in runtime contexts (#13602)

This pull request:

- Fixes #10357
- Fixes #9908

Currently, checkmember.py attempts handli...

71e19e85e2adc68594e983d012f07bfe7af7256c authored over 2 years ago
Clean up long removed config (#13610)

8eb9cdc5677440704fb6d4e90eef79be3c2b160f authored over 2 years ago
Detect metaclass conflicts (#13598)

Recreate of https://github.com/python/mypy/pull/13565
Closes #13563

9d2161546c552e50a49dfe53cf1198c973c7eff2 authored over 2 years ago
Fix unnecessarily split quotes, couple string bugs (#13603)

This is a relic from blackening. Actually quite a few buggy strings in
here, so glad I did this.

130e1a4e6fc5b14fda625495e25abd177af61bbb authored over 2 years ago
Set metaclass in `make_fake_typeinfo` (#13568)

`calculate_metaclass_info()` does not mutate `info`, it returns a value.
It was never used.

...

2e326b2394b0af44c8023c6b7d153bff1c1b5c54 authored over 2 years ago
Defer all types whos metaclass is not ready (#13579)

dfbaff74f1d05c2597f48105b3c0cf974066c1fa authored over 2 years ago
Treat `ABCMeta` subtypes as abstract metaclasses (#13562)

Closes #13561

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

fd2d68435bfb1e7e250c435e5f782d8325523614 authored over 2 years ago
Fix spurious unreachable and disallow-any errors from deferred passes (#13575)

This diff:

- Fixes #8129
- Fixes #13043
- Fixes #13167

For more concise repros of these ...

0a8d425420ae958da4f11539a648707e9025b737 authored over 2 years ago
Improve error message for partial None with `--local-partial-types` (#12822)

When --local-partial-types is set and we can't infer a complete type for
a type that we initial...

cf7495f369a3fda29f784dc01ceee011cb74d344 authored over 2 years ago
Work around mypyc test failures in CI (#13593)

Temporary workaround to #13572 that slows down mypyc tests.

38eb6e8a05d201f0db94b62a69d5ee5ca68b3738 authored over 2 years ago
[mypyc] Support __pos__ and __abs__ dunders (#13490)

Calls to these dunders on native classes will be specialized to use a
direct method call instea...

3c7e21600874948fb15e6ba2370d3f44a81b9378 authored over 2 years ago
[minor] Actually, don't report test durations (#13571)

This gets in the way more than I thought and has not inspired anyone to
make tests faster.

7ffaf230a3984faaf848fe314cf275b854a0cdb0 authored over 2 years ago
[mypyc] Track definedness of native int attributes using a bitmap (#13532)

Since native ints can't support a reserved value to mark an undefined
attribute, use a separate...

9393fa1e40bca3647e12b10bd9a81410fa92c610 authored over 2 years ago
Make dataclass attr collection no longer worst-case quadratic (#13539)

While working on #13531, I noticed that DataclassTransformer's
`collect_attributes` method was ...

285773626b26d451f68717e127a932144e9a6f04 authored over 2 years ago
selfcheck: Enable the `redundant-expr` error code (#13547)

* selfcheck: Enable the `redundant-expr` error code

* Remove unnecessary `type: ignore`

* ...

840a310f0b6c4a4bd7edfb141c8d1731ba4dd027 authored over 2 years ago
Bump `flake8` test dependencies; remove `importlib_metadata` as a test dependency (#13555)

d9bdd6d96b778388b6aa9d1405bd7a987889f6c2 authored over 2 years ago
Remove F821 from the flake8 ignorelist (#13553)

This is a useful check, and it doesn't seem to generate false positives anymore

f04e314219ac116c8c35512f26f1b61191c7d9fe authored over 2 years ago
Fix simple literal inference in class bodies in import cycle (#13552)

This fixes a little regression caused by #13494

ff1199bc8fbcde51f878328d6cff72ed9f806375 authored over 2 years ago