mypy-zope
mypy-zope copied to clipboard
Plugin for mypy to support zope.interface
Error importing plugin "mypy_zope": cannot import name 'SemanticAnalyzerPass2' from 'mypy.semanal'
Tried to update to mypy 0.942, but I started seeing this: ``` mypy.ini:4: error: Error importing plugin "mypy_zope": cannot import name 'SemanticAnalyzerPass2' from 'mypy.semanal' (/home/runner/.cache/pre-commit/repo_fawoait/py_env-python3.8/lib/python3.8/site-packages/mypy/semanal.cpython-38-x86_64-linux-gnu.so) [misc] ``` I do see...
Updates the requirements on [mypy](https://github.com/python/mypy) to permit the latest version. Changelog Sourced from mypy's changelog. Mypy Release Notes Next release Mypy 1.10 We’ve just uploaded mypy 1.10 to the Python...
Example: If [`zope-stubs/__init__.pyi`](https://github.com/Shoobx/mypy-zope/blob/master/src/zope-stubs/__init__.pyi) exists, VSCode with mypy addon fails to resolve all Zope packages other than `zope.interface` and `zope.schema`, for example `zope.component`, `zope.location`, `zope.site` all have no type hints. If...
And reapply all changes that we've manually made. Fixes #102
Looks like stubs were generated for an old version of zope.interface, is that intended?
This probably requires some implementation support from the zope.interface side, but I find myself wanting to be able to write this: ```python3 from dataclasses import dataclass from typing import Generic,...
With mypy 1.0.0 and mypy-zope 0.9.0, the typechecker seems to think that that `isinstance(x, T)` is always false when `T` implements some interface `I`and `x: Optional[I]`. For example, the source...
Python allows you to create new classes using [the three-argument form of the `type()` builtin](https://docs.python.org/3/library/functions.html#type). I can't tell if it's a mypy-zope problem or a mypy problem, but this doesn't...
i.e. ```python3 from zope.interface import Interface class IFoo(Interface): def foo() -> int: ... reveal_type(IFoo(object(), None)) ``` ``` Revealed type is "IFoo" ``` This ought to be `IFoo | None`.