mypy-zope
mypy-zope copied to clipboard
Plugin for mypy to support zope.interface
it should be possible to create a zope.interface.Interface by introspecting a `typing.Protocol` ```python class SomeProtocol(typing.Protocol): @property def foo(self) -> str: ... def ham(self) -> int: ... ISome = mypy_zope.fromProtocol("ISome", SomeProtocol)...
Let's say I have two interfaces `IA` and `IB`. They're completely independent of each other. I implement both in some type `C`. ```python from zope.interface import Interface, implementer class IA(Interface):...
(Maybe on your TODO list already but if not…) The `zope.interface` type stubs are just what I needed! If you've got some time, it'd be great to see `zope.component` get...
similar to #34 and #41 here's a simple repro: https://github.com/graingert/amp-mypy-zope-demo/tree/default
eg I might want to define ```python class ICopyable(zope.interface.Interface): def copy(self: T) -> T: pass ``` but I get "Interface methods should not have 'self' argument"
In https://github.com/twisted/klein/pull/471, I'm running into the following [error in CI](https://github.com/twisted/klein/runs/2097187159): ```console src/klein/_dihttp.py:62:16: error: Incompatible return value type (got "RequestURL", expected "IDependencyInjector") [return-value] return cls() ``` The [code in question](https://github.com/twisted/klein/blob/b46383c96ef5d0e9fbd186b3b47336feacd26bb1/src/klein/_dihttp.py#L62) is:...
Probably an upstream issue, but first encountered here, so reporting the details. Running a check on a file importing `zope.interface` will result in an error "Skipping analyzing zope.interface". ``` draft...
This example doesn't complain: ```python3 from zope.interface import Interface, Attribute, implementer class IWhatever(Interface): stuff: str = Attribute("name") @implementer(IWhatever) class WhateverBroken(object): stuff: int ``` even though the type of `stuff` doesn't...
Hi! Thanks for this awesome project! I am [TypedDjango](https://github.com/TypedDjango) team member, we maintain types for, well, django. And we do pretty much the same job. For example, we also test...
This is a repeat of #42 https://pypi.org/project/mypy-zope/1.0.5/#files shows only an sdist Prior releases have a wheel: https://pypi.org/project/mypy-zope/1.0.4/#files https://pypi.org/project/mypy-zope/1.0.3/#files Might be worth looking into having GitHub Actions publish the releases? https://docs.pypi.org/trusted-publishers/