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
Signed-off-by: jinzewu <[email protected]>
c5db2b60219f54726839442080d02e5e1773d3b4 authored over 2 years ago
Fixes
https://github.com/python/mypy/issues/13771#issuecomment-1262749908
f85dfa1b2533621094bc45b4263ea41fd3bc2e39 authored over 2 years ago
Ref #4717
This will allow people who consider this check too strict to opt-out
easily using...
Fixes https://github.com/python/mypy/issues/13756
55ee0865ef21c94a361737dccac1e71dd7d36c19 authored over 2 years ago
The
[`importlib.resources.path`](https://docs.python.org/3.11/library/importlib.resources.html#...
Fixes #13580
24aab8eccfff97eaa13e3464c2f0513e009313c2 authored over 2 years agoThis 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
This fixes an annoyance where the messages got reshuffled between daemon
runs.
Also if there...
efdda88eb50b025318e2f1952c7f2dd9aa36e473 authored over 2 years agoFixes #13770
78190856b09a1eca923f9620ba7af1325b06e33e authored over 2 years agoResolves #13711, resolves #13429
a1eeddb95c5701dbc89ea04574ab929aeba10dad authored over 2 years ago
Capture stdout in daemon and display it in the client. This makes it
possible to use debug prin...
If daemon was running and additional third party code was installed,
mypy daemon would report e...
I don't think we need to wait long time for this. As soon as next
release goes out, I think we ...
This should fix a crash discovered by `mypy_primer` in
https://github.com/python/mypy/pull/1351...
Fixes #2350
This essentially re-applies https://github.com/python/mypy/pull/8111
modulo vari...
d560570c6f768d8e49062dc7c1011bc03cd401f9 authored over 2 years ago
3015abf582994c63c048d2035c772d7463f879dc authored over 2 years ago
Fixes #13757
e898652e64ecb58aa6f4341e626649c2dabb37e2 authored over 2 years ago
As `mypy_primer` in https://github.com/python/mypy/pull/13516 shows,
some people actually use t...
See #13681
"Mapping file paths to modules" belongs next to "Specifying code to be
checked". ...
Part of the effort to nudge users into using specific type ignores. See
#13541
This PR enabl...
da43c912bf43855aed82ff25c264c1ca9431ce10 authored over 2 years ago00d547f266e617c16ea8f309ce27a9fabc466f36 authored over 2 years ago
063f05b4cb5fc1386fe2ef12def67e1964173597 authored over 2 years ago
It was failing:
https://github.com/python/mypy/actions/runs/3133286021/jobs/5086495727
aa947e2310b18925fad38c982a48109c4dcf1eed authored over 2 years ago
Fixes #9091
This brings us in line with the PEP 484 updates in 2018
027c58a99cc71eadfb9719519b2c7e89e43b926b authored over 2 years agoFixes #11234
ab3b98fad942bb3f13f3a8f94c447433b8876ae2 authored over 2 years ago780534b13722b7b0422178c049a1cbbf4ea4255b authored over 2 years ago
Source commit:
https://github.com/python/typeshed/commit/9abe56a19a42fd1e225a2b8d8b9ab8d830d5...
ffd78df93d058962f9a2007f54412783bc760550 authored over 2 years agoFixes #10575
50ac875cbf26705cddabaacf144065b733fc7ccf authored over 2 years ago
Fixes https://github.com/python/mypy/issues/13713, fixes
https://github.com/python/mypy/issues/...
Fixes #12886
`contract_starred_pattern_types` and `expand_starred_pattern_types` are
sort of...
Also don't complain about other TypeVarLikeTypes
Implements
https://github.com/python/mypy/p...
Fixes #13727, fixes #12448, fixes #13213
f56a0715d43eb2572e317793030c0082ae581be1 authored over 2 years agoThis is an attempt to fix the attrs magic attribute handling.
The attrs magic attribute funct...
320f3687a81055f454205f0bce62010de21dc284 authored over 2 years agoSee #13681.
Prefer mypy: ignore-errors over module level type: ignore, which is
surprising. ...
See #13681. I'd like to make bigger changes to this page, but still
thinking them through
This pull request fixes #9838.
It turns out that when an object is using a metaclass, it uses...
f5ce4ee6ca7e2d8bb1cde8a2b49865f53bbacff5 authored over 2 years agoFixes #12112.
The reason why mypy was crashing with a "Must not defer during final
iteration...
The old one was long and weirdly incomplete. It had placeholder text
like "link to instructions".
Meant to do this in https://github.com/python/mypy/pull/13722
dc6714edcf8ce46eccfff9e9448c43f5a875496d authored over 2 years ago
Note: This change is part of a series of upcoming MRs to improve
`stubgenc`.
`stubgenc` trie...
be63842c316c7a223e1c4bf841bcb87a6e5f131b authored over 2 years ago
Suggest providing a link to the project to help fuel mypy_primer. Let
Github wrap text. Phrase ...
The existing logic for splitting mapped & template into prefix, middle,
and suffix does not han...
Now we have suggestions for almost all the currently available
third-party packages in typeshed...
Originally this PR was intended to add some test cases from PEP646.
However it became immediate...
6a5019272449dc2a629838c549941570b57e1ac4 authored over 2 years ago
See #13681
e40d214106d4d8c7c943546a686fd5d11da3aff4 authored over 2 years agoSee #13681
PEP 563 is in limbo, so fix incorrect statements
Mention what type comments are...
f8d6e7d87df4583440bbe6eaccb7404bc3028b68 authored over 2 years agoSee #13681
In particular, it's really common to want to make progress towards
`--strict`, an...
See #13681
e4edea31a2f87f08189ac197de820a8214d55876 authored over 2 years agoChanged `Typevar` -> `TypeVar` in the error message from #13166.
I was testing the mypy 0.980...
1d4395f14a0b2a923dd24e881887ff9360ec50fa authored over 2 years agod619c783d4713a13083a1a6e8020075948baceb2 authored over 2 years ago
I don't think testing the different architecture gains us anything, and
[we don't build mypyc c...
### Description
This PR tweaks two things about how mypyc generates and builds C code to
bet...
Closes https://github.com/python/mypy/issues/13646
Co-authored-by: Shantanu <12621235+hauntsa...
7c14feedd2a6889d9eab8b0ac8dc8aab630bbed3 authored over 2 years ago
The CI has started to sporadically fail depending on whether 3.10.6 is
picked up by GitHub Acti...
Previously the for index variable would always be inferred a plain `int`
when iterating over ra...
c306f6e5afc5b6d40b074705616d1c867866285b authored over 2 years ago
Add support for `WithStmt` nodes for the partially defined check.
9daf79af70fe962f50b88dd75a6fdc591b96b339 authored over 2 years agoDescription
Adds support for `DictionaryComprehension` nodes for the partially
defined check.
### Description
Adds support for `AssignmentExpr` nodes for the partially defined check.
Generating errors after first occurrence is pure noise -- if the
variable is actually undefined...
Fixes #13654, caused by #13629
a5f218f564ceea35a5dfaab442c8276beae70287 authored over 2 years ago
This builds on #13601 to add support for statements like `continue`,
`break`, `return`, `raise`...
Removing a bunch of `TODO` items.
0f17aff06ac1c05c442ba989e23655a2c6adbfbf authored over 2 years agoThese are now optimized for i32, i64 and int arguments.
`i32(x)` truncates from `i64`, but do...
c8e5278a53018823556dc392263415058f9eec12 authored over 2 years agoFixes #13633
- Incompatible stubs aren't really a thing (that is visible to mypy at
module f...
Closes #13599
520b83e40efb2400e3679ec97bd620c3c63560c0 authored over 2 years ago
This was broken by https://github.com/python/mypy/pull/13155, fix is
straightforward, pass cust...
`reveal_type` provides a useful note to users that it will always reveal
`Any` within an unchec...
This implements cases for homogenous and non-homogenous tuples in the
supertype of branch for c...
This diff lays the foundation for detecting partially defined variables.
Think of the following...
Allow a `TypedDict` to be decorated with `@final`. Like a regular class,
mypy will emit an erro...
cc59b563ce63d80c61ff8ddcbb410fd1f1dbcdcc authored over 2 years ago
On Windows, `MYPYPATH` needs to be a _semicolon_-separated list of
paths, rather than a _colon_...
Oh, this was very interesting.
During the debug sessions I learned a lot about how pattern matc...
There's no reserved value we can use to track if a local variable with
a native int type hasn't...
Let it only take an ErrorMessage. The default error now gets an error
code as well, which close...
Since native ints can't have a dedicated reserved value to mark a
missing argument, use extra b...
Fixes #9234
This diff fixes a bug in `infer_lambda_type_using_context` where it blindly trust...
ad56164690e58d3d71b59f7558418dd058b1951f authored over 2 years agoThis pull request:
- Fixes #10357
- Fixes #9908
Currently, checkmember.py attempts handli...
71e19e85e2adc68594e983d012f07bfe7af7256c authored over 2 years ago8eb9cdc5677440704fb6d4e90eef79be3c2b160f authored over 2 years ago
Recreate of https://github.com/python/mypy/pull/13565
Closes #13563
This is a relic from blackening. Actually quite a few buggy strings in
here, so glad I did this.
`calculate_metaclass_info()` does not mutate `info`, it returns a value.
It was never used.
...
2e326b2394b0af44c8023c6b7d153bff1c1b5c54 authored over 2 years agodfbaff74f1d05c2597f48105b3c0cf974066c1fa authored over 2 years ago
Closes #13561
Co-authored-by: Shantanu <[email protected]>
fd2d68435bfb1e7e250c435e5f782d8325523614 authored over 2 years agoThis diff:
- Fixes #8129
- Fixes #13043
- Fixes #13167
For more concise repros of these ...
0a8d425420ae958da4f11539a648707e9025b737 authored over 2 years ago
When --local-partial-types is set and we can't infer a complete type for
a type that we initial...
Temporary workaround to #13572 that slows down mypyc tests.
38eb6e8a05d201f0db94b62a69d5ee5ca68b3738 authored over 2 years ago
Calls to these dunders on native classes will be specialized to use a
direct method call instea...
This gets in the way more than I thought and has not inspired anyone to
make tests faster.
Since native ints can't support a reserved value to mark an undefined
attribute, use a separate...
While working on #13531, I noticed that DataclassTransformer's
`collect_attributes` method was ...
* selfcheck: Enable the `redundant-expr` error code
* Remove unnecessary `type: ignore`
* ...
840a310f0b6c4a4bd7edfb141c8d1731ba4dd027 authored over 2 years agod9bdd6d96b778388b6aa9d1405bd7a987889f6c2 authored over 2 years ago
This is a useful check, and it doesn't seem to generate false positives anymore
f04e314219ac116c8c35512f26f1b61191c7d9fe authored over 2 years agoThis fixes a little regression caused by #13494
ff1199bc8fbcde51f878328d6cff72ed9f806375 authored over 2 years ago