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
Followup to #15444
bf9230934c4ce68c8c01aa0dd6aef57b180cc08b authored over 1 year ago6f913a148e1c1ec126d2009272a4a26ff61b8195 authored over 1 year ago
9f3bbbeb1f5c8ca70f9d0386d5d1091f23e9a7cc authored over 1 year ago
Source commit:
https://github.com/python/typeshed/commit/c38fc45d9c9340eb11e6dd279f460f8a1b3d5d7b
This is allegedly causing large performance problems, see 13821
typeshed/8231 had zero hits on ...
475a46a7820e1ff7990a23c6ae745acbb3678c18 authored over 1 year agoSince the plugin provides superior type checking: https://github.com/python/mypy/pull/13987#issue...
f5e5c117de36a339209c885d44b1b784e17023a4 authored over 1 year ago
Check that `default` type is a subtype of `bound` or one of the
constraint types.
Add `defau...
66b96ed54b255495288ba539e3fd1f54f21d4abe authored over 1 year ago
I initially included an error (removed allowlisted error code that is
not covered), to verify i...
Fixes #15431
After this PR one will be able to easily find documentation for given
error cod...
Fixes #10709
Two changes here:
* Add equality methods to `ErrorCode` because they may appea...
Makes the HTML builder generate a _refs.html file that redirects
(global) refs (when provided a...
2a89f752dc174b4f0b99291c4a6bf10338dbbd5e authored over 1 year ago
Co-authored-by: hauntsaninja <[email protected]>
61a7f3bfa37c433ac34f4f07dc224a1745577c82 authored over 1 year agoFixes https://github.com/python/mypy/pull/15385#issuecomment-1587030261
cab8c674ebef944498ae4e9a89cd9c77316656ec authored over 1 year ago
While investigating something unrelated I stumbled across the `*_setup`
functions, and I notice...
4aa18ea818bfe55617c3f2423d1020796ceccdfc authored over 1 year ago
9e7bc383eb9a5df94e8bf6117f008d97017a1fcf authored over 1 year ago
Fixes #14845.
p.s. In the issue above, I was concerned that adding this method would
create ...
e7b917ec7532206b996542570f4b68a33c3ff771 authored over 1 year ago
Fixes #15380
Note I also update the `NamedTuple` fixture to be much closer to real
definitio...
Fixes #15378
2c66cba59fefadd0f3ab71a605d9a458fb14f1f6 authored over 1 year agoFixes #15351
This may have some perf impact, but I predict it will be minimal (and I
didn't ...
4baf672a8fe19bb78bcb99ec706e3aa0f7c8605c authored over 1 year ago
27593bc23cf6be4ad9a37d6c1bc13abc5f2190ec authored over 1 year ago
e253e7660d48422d3a0ea643bc1b11419fb3cddc authored over 1 year ago
8dde298fba2e021d1309a0d796a4a7efccc11e41 authored over 1 year ago
f54c3096b7d328dc59dd85af3a8ba28739dcfed0 authored over 1 year ago
fe0714acc7d890fe0331054065199097076f356e authored over 1 year ago
This PR updates the semantic analyzer to support most forms of TypeVars
with defaults while als...
This should allow the inner pytest to pass even when the outer pytest is
invoked outside of the...
Continue type checking if a class has two or more identical bases.
Closes https://github.com/py...
21c5439dccfc6fc21f126200b95b0552f503d5da authored over 1 year ago
```python
def f(b: bool) -> None:
if b:
y = 1
else:
y = None
f(F...
f8f9453083c416237247a6596692c8d2b42adc78 authored over 1 year ago
This PR inlines math literals such as `math.pi` and `math.e`. Previously
Using `math.pi` would ...
c0af000d068b30362c4f4f72b8823e4f3f5b3e08 authored over 1 year ago
Co-authored-by: Shantanu <[email protected]>
Co-authored-by: haunt...
A class marked with `allow_interpreted_subclasses=True` implicitly
supports serialization while...
3e034848a29acc374379ae68ff9c450fdb9cc2a2 authored over 1 year ago
Preparation for #13985 to make the transition from `master` to `main` as
seamless as possible.
...
Start implementing [PEP 696](https://peps.python.org/pep-0696/) TypeVar
defaults. This PR
* Ad...
7fe1fdd6f805025b1121380e73bcda38b707c546 authored over 1 year ago
Fixes #14746
da5dffc444544507ba4ab35610c73ac301bcea83 authored over 1 year ago
`adjust_error_kinds()` should be run over every block, but the old impl.
of `insert_exception_h...
Also use keyword arguments + copy_modified for this in many places
f66199f087f4b94b5d3f9c05fa9a438b251b3ccb authored over 1 year agoSee #12582. pyright supports this pattern as well.
cbf16658826a1a6372d6bebc298505c67f9fc7bc authored over 1 year ago`TestItem` has instance attributes, so it doesn't need the class vars.
b8dd40e741913a4addb58b3b7e50f076659bccd5 authored over 1 year ago
The order in which inline error assertions are collected into the
`TestCase.output` (the "expec...
These tests have been failing when running in some terminals:
```
FAILED mypy/test/teststubtes...
`teststubtest.py` is currently failing on `master` due to changes that
were made to `typing_ext...
The regular function body has no type information if the function uses
a type variable with a v...
Previously they were sometimes reported as `builtins.type.method_name`
(i.e. a method of `built...
This PR removes labels which are never jumped to, as well as removing
gotos that jump directly ...
Resolves #10744
2ede35fe24ad1c6c2444156c753609f6b7888064 authored over 1 year ago
Previously the "signature incompatible with supertype" error only
included detailed comparison ...
Fixes #15062
Implementing "happy path" took like couple dozen lines, but there are *a
lot* ...
This add support for `attrs.fields`, which is a nicer way of accessing
the attrs magic attribut...
This PR refactors name resolution in stubgen to make it simple to use
and fixes a bunch of rela...
"attrs" namespace, "attrs.define" and "attrs.field" are the recommended
new namespace and API o...
Fixes https://github.com/python/mypy/issues/15214 but adding a note to
the dmypy docs.
Closes #15153.
This issue was already addressed in #15184; we're adding a regression
test.
Follow up to #13427.
af39755c27cc9563d1e80bdf259b6d574f48ea57 authored over 1 year agoFixes #9963, fixes #12693
2e6d11ea786cce95b718b73d07bc89a320d9ccbc authored over 1 year ago
We were checking only for `typing_extensions.Unpack`, which breaks code
when checking at 3.11+ ...
Currently, when starting the mypy daemon, we're passing the timeout and
log_file as part of the...
Fixes mypyc/mypyc#994.
16667f383d84add3c8d48f6c608f043d4ef62eb3 authored over 1 year agoacce2709bac5cd65e983b694ce162f42e4a87176 authored over 1 year ago
Source commit:
https://github.com/python/typeshed/commit/15a0c28530ffcda0d4be2026511af3604336...
848b2d39f03a4c0df60d324422bae1bbf6c5f35d authored over 1 year ago
pre-commit is failing on `master`:
https://github.com/python/mypy/actions/runs/4970566646/jobs/...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
449052583986c3b3a0e7f2e917516e7b910dc163 authored over 1 year agoFixes #7961
2df6f365b52a2a230c698af148a50ce7fb9d3108 authored over 1 year agoFixes case 1 in https://github.com/python/mypy/issues/14529
f176f6a14f76050d786463a977e735c6a648fd76 authored over 1 year agoFixes #15132
9ecc4efb1d5f86394394f49a4964926ccf183c1c authored over 1 year ago
Update the link to latest version MS has on its website. (there's no
more build tools for 2017,...
This makes it easier to maintain the configurations for the various
linting tools we use in CI....
Forgotten comma between parameters.
1d144f0c67b53907a627d6f70398beb0baadafaa authored over 1 year agoCloses #14072
This implements support for [PEP
698](https://peps.python.org/pep-0698/), whi...
When starting mypy daemon, we pickle options. Error codes are part of
options and need to be pi...
This is a recent regression
fe7007fef6f36384ba52de8ab5fb8b951179dc25 authored over 1 year ago
This used to be a source of code duplication, and also using the
"native" visitor will allow us...
This is a pure refactor to improve code organization.
c54c226165925eb43ea55edad5c41c734deb1278 authored over 1 year agox-ref: #15197
62835166774b2346f9f6afef61b9f7117c551ff2 authored over 1 year agoThis is another PR to prepare for variadic type aliases.
d671b318c2d27d993acb1015588dd47c9d42f643 authored over 1 year ago
This is in preparation for support of variadic type aliases. This PR
should be a no-op from use...
Fixes #15195
ba8ae294e16c6ebc6a37c897a4618e27528c7ce7 authored over 1 year agoFixes #15192
The following code optimises make_simplified_union in the common case
that ther...
bfc1a7631a48ecb3d2d0fedfe030b99a9e85e116 authored over 1 year ago
The two files got out of sync after #15167
b69060a0fa6d7fe93e0b81cf243632aa779deaa6 authored over 1 year ago
Fixes #9901
Fixes #13662
Fix inheriting from a call-based `collections.namedtuple` /
`typin...
Fixes #14681
d710fdd9cf979ad0cf5758b069f4e5d488d13d12 authored over 1 year agoFixes #12977
IMO current dict expression inference logic is quite arbitrary: we only
take th...
This PR fixes the
[`FURB129`](https://github.com/dosisod/refurb/blob/master/docs/checks.md#furb...
Fixes #12677
When assert_type fails, when the type of value examined and the
specified type ...
See https://github.com/python/mypy/pull/15133#issuecomment-1533794642
for context.
This reverts commit a9ee618f3a941098b24156eb499db5684fcfc261.
The original fix doesn't work i...
d17b3edb5ce7867201102ef66f362849d9da3fd0 authored over 1 year ago
This adds tests for mixing star args with typevar tuples from PEP646. In
order to do this we ha...
Fixes #2608.
Use the heuristic suggested in #2608 and allow narrowed types of
variables (but...
<!--pre-commit.ci start-->
updates:
- [github.com/pycqa/isort: 5.11.5 →
5.12.0](https://githu...
Fixes #8823
The issue above makes `--warn-unused-ignores` problematic for
cross-platform/cr...
Fixes #14796
66602fcde3468d7a284aa89cb280d448f454e07b authored over 1 year agoFix #15004
FWIW I don't think dataclass protocols make much sense, but we
definitely should...