| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
Sorry, something went wrong.
| self.variables = variables | ||
| self.variables: tuple[TypeVarLikeType, ...] | ||
| if variables is None: | ||
| self.variables = () | ||
| else: | ||
| self.variables = tuple(variables) |
There was a problem hiding this comment.
Note, this does crash the pydantic.v1 extension.
File "/.../python3.13/site-packages/pydantic/v1/mypy.py", line 868, in add_method
signature.variables = [tvar_def]
^^^^^^^^^^^^^^^^^^^
TypeError: tuple object expected; got listhttps://github.com/pydantic/pydantic/blob/v2.11.7/pydantic/v1/mypy.py#L866-L868
It can fairly easily be fixed and I'll open a PR for it soon. However, that might not be the only plugin which depends on it being "just" a sequence.
Sorry, something went wrong.
There was a problem hiding this comment.
If we have evidence that this impacts multiple plugins, we can consider reverting this change.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Several mypy micro-optimizations. Together with batches 2 and 3 these improve self check performance by 1.8%.