Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate zope.interfaces stubs #105

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/zope-stubs/interface/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Stubs for zope.interface (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from zope.interface.declarations import Declaration as Declaration, alsoProvides as alsoProvides, classImplements as classImplements, classImplementsOnly as classImplementsOnly, classProvides as classProvides, directlyProvidedBy as directlyProvidedBy, directlyProvides as directlyProvides, implementedBy as implementedBy, implementer as implementer, implementer_only as implementer_only, implements as implements, implementsOnly as implementsOnly, moduleProvides as moduleProvides, noLongerProvides as noLongerProvides, providedBy as providedBy, provider as provider, named as named
from zope.interface.declarations import Declaration as Declaration, alsoProvides as alsoProvides, classImplements as classImplements, classImplementsFirst as classImplementsFirst, classImplementsOnly as classImplementsOnly, directlyProvidedBy as directlyProvidedBy, directlyProvides as directlyProvides, implementedBy as implementedBy, implementer as implementer, implementer_only as implementer_only, moduleProvides as moduleProvides, noLongerProvides as noLongerProvides, providedBy as providedBy, provider as provider
from zope.interface.interface import Attribute as Attribute, Interface as Interface, interfacemethod as interfacemethod, invariant as invariant, taggedValue as taggedValue
from zope.exceptions import Invalid as Invalid, DoesNotImplement as DoesNotImplement, BrokenImplementation as BrokenImplementation, InvalidInterface as InvalidInterface, BadImplements as BadImplements
from zope.interface.exceptions import Invalid as Invalid, DoesNotImplement as DoesNotImplement, BrokenImplementation as BrokenImplementation, Inval
from zope.interface import adapter as adapter
from zope.interface import advice as advice
from zope.interface import interfaces as interfaces
Expand Down
11 changes: 2 additions & 9 deletions src/zope-stubs/interface/_compat.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# Stubs for zope.interface._compat (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from _typeshed import Incomplete

from typing import Any

CLASS_TYPES: Any
STRING_TYPES: Any
PYTHON3: bool
PYTHON2: bool
PYPY: Incomplete
5 changes: 1 addition & 4 deletions src/zope-stubs/interface/_flatten.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
# Stubs for zope.interface._flatten (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from zope.interface import Declaration as Declaration
40 changes: 26 additions & 14 deletions src/zope-stubs/interface/_zope_interface_coptimizations.pyi
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
# Stubs for zope.interface._zope_interface_coptimizations (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any

import _interface_coptimizations
import _zope_interface_coptimizations
adapter_hooks: Any

def getObjectSpecification(*args, **kwargs) -> Any: ...
def implementedBy(*args, **kwargs) -> Any: ...
def providedBy(*args, **kwargs) -> Any: ...
adapter_hooks: list

class ClassProvidesBase(_interface_coptimizations.SpecificationBase):
_cls: Any
_implements: Any
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __get__(self, *args, **kwargs) -> Any: ...
def __get__(self, instance, owner) -> Any: ...

class InterfaceBase:
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
class InterfaceBase(_interface_coptimizations.SpecificationBase):
__ibmodule__: Any
__name__: Any
def __init__(self, *args, **kwargs) -> None: ...
def __adapt__(self, *args, **kwargs) -> Any: ...
def __call__(self, *args, **kwargs) -> Any: ...
def __eq__(self, other) -> bool: ...
def __ge__(self, other) -> bool: ...
def __gt__(self, other) -> bool: ...
def __hash__(self) -> int: ...
def __le__(self, other) -> bool: ...
def __lt__(self, other) -> bool: ...
def __ne__(self, other) -> bool: ...

class LookupBase:
@classmethod
Expand All @@ -37,9 +39,15 @@ class LookupBase:
class ObjectSpecificationDescriptor:
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def __get__(self, *args, **kwargs) -> Any: ...
def __get__(self, instance, owner) -> Any: ...

class SpecificationBase:
_bases: Any
_dependents: Any
_implied: Any
_v_attrs: Any
__iro__: Any
__sro__: Any
@classmethod
def __init__(cls, *args, **kwargs) -> None: ...
def implementedBy(self, *args, **kwargs) -> Any: ...
Expand All @@ -57,3 +65,7 @@ class VerifyingBase(_zope_interface_coptimizations.LookupBase):
def lookupAll(self, *args, **kwargs) -> Any: ...
def queryAdapter(self, *args, **kwargs) -> Any: ...
def subscriptions(self, *args, **kwargs) -> Any: ...

def getObjectSpecification(*args, **kwargs) -> Any: ...
def implementedBy(*args, **kwargs) -> Any: ...
def providedBy(*args, **kwargs) -> Any: ...
84 changes: 40 additions & 44 deletions src/zope-stubs/interface/adapter.pyi
Original file line number Diff line number Diff line change
@@ -1,58 +1,54 @@
# Stubs for zope.interface.adapter (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any, Optional
from zope.interface._zope_interface_coptimizations import LookupBase, VerifyingBase
from _typeshed import Incomplete
from collections.abc import Generator

class BaseAdapterRegistry:
__bases__: Any = ...
def __init__(self, bases: Any = ...) -> None: ...
def changed(self, originally_changed: Any) -> None: ...
def register(self, required: Any, provided: Any, name: Any, value: Any): ...
def registered(self, required: Any, provided: Any, name: Any = ...): ...
def unregister(self, required: Any, provided: Any, name: Any, value: Optional[Any] = ...): ...
def subscribe(self, required: Any, provided: Any, value: Any) -> None: ...
def unsubscribe(self, required: Any, provided: Any, value: Optional[Any] = ...): ...
def get(self, _: Any): ...

class LookupBaseFallback:
__bases__: Incomplete
def __init__(self, bases=...) -> None: ...
def changed(self, originally_changed) -> None: ...
def register(self, required, provided, name, value) -> None: ...
def registered(self, required, provided, name: str = ...): ...
def allRegistrations(self) -> Generator[Incomplete, Incomplete, None]: ...
def unregister(self, required, provided, name, value: Incomplete | None = ...): ...
def subscribe(self, required, provided, value) -> None: ...
def subscribed(self, required, provided, subscriber): ...
def allSubscriptions(self) -> Generator[Incomplete, None, None]: ...
def unsubscribe(self, required, provided, value: Incomplete | None = ...) -> None: ...
def rebuild(self): ...
def get(self, _): ...

class LookupBase:
def __init__(self) -> None: ...
def changed(self, ignored: Optional[Any] = ...) -> None: ...
def lookup(self, required: Any, provided: Any, name: Any = ..., default: Optional[Any] = ...): ...
def lookup1(self, required: Any, provided: Any, name: Any = ..., default: Optional[Any] = ...): ...
def queryAdapter(self, object: Any, provided: Any, name: Any = ..., default: Optional[Any] = ...): ...
def adapter_hook(self, provided: Any, object: Any, name: Any = ..., default: Optional[Any] = ...): ...
def lookupAll(self, required: Any, provided: Any): ...
def subscriptions(self, required: Any, provided: Any): ...
LookupBasePy = LookupBaseFallback
LookupBase = LookupBaseFallback

class VerifyingBaseFallback(LookupBaseFallback):
def changed(self, originally_changed: Any) -> None: ...
def lookupAll(self, required: Any, provided: Any): ...
def subscriptions(self, required: Any, provided: Any): ...
VerifyingBasePy = VerifyingBaseFallback
VerifyingBase = VerifyingBaseFallback
def changed(self, ignored: Incomplete | None = ...) -> None: ...
def lookup(self, required, provided, name: str = ..., default: Incomplete | None = ...): ...
def lookup1(self, required, provided, name: str = ..., default: Incomplete | None = ...): ...
def queryAdapter(self, object, provided, name: str = ..., default: Incomplete | None = ...): ...
def adapter_hook(self, provided, object, name: str = ..., default: Incomplete | None = ...): ...
def lookupAll(self, required, provided): ...
def subscriptions(self, required, provided): ...

class VerifyingBase(LookupBaseFallback):
def changed(self, originally_changed) -> None: ...
def lookupAll(self, required, provided): ...
def subscriptions(self, required, provided): ...

class AdapterLookupBase:
def __init__(self, registry: Any) -> None: ...
def changed(self, ignored: Optional[Any] = ...) -> None: ...
def __init__(self, registry) -> None: ...
def changed(self, ignored: Incomplete | None = ...) -> None: ...
def init_extendors(self) -> None: ...
def add_extendor(self, provided: Any) -> None: ...
def remove_extendor(self, provided: Any) -> None: ...
def queryMultiAdapter(self, objects: Any, provided: Any, name: Any = ..., default: Optional[Any] = ...): ...
def names(self, required: Any, provided: Any): ...
def subscribers(self, objects: Any, provided: Any): ...
def add_extendor(self, provided) -> None: ...
def remove_extendor(self, provided) -> None: ...
def queryMultiAdapter(self, objects, provided, name: str = ..., default: Incomplete | None = ...): ...
def names(self, required, provided): ...
def subscribers(self, objects, provided): ...

class AdapterLookup(AdapterLookupBase, LookupBase): ...

class AdapterRegistry(BaseAdapterRegistry):
LookupClass: Any = ...
def __init__(self, bases: Any = ...) -> None: ...
def changed(self, originally_changed: Any) -> None: ...
LookupClass = AdapterLookup
def __init__(self, bases=...) -> None: ...
def changed(self, originally_changed) -> None: ...

class VerifyingAdapterLookup(AdapterLookupBase, VerifyingBase): ...

class VerifyingAdapterRegistry(BaseAdapterRegistry):
LookupClass: Any = ...
LookupClass = VerifyingAdapterLookup
15 changes: 5 additions & 10 deletions src/zope-stubs/interface/advice.pyi
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# Stubs for zope.interface.advice (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from _typeshed import Incomplete

from typing import Any, Optional

def getFrameInfo(frame: Any): ...
def addClassAdvisor(callback: Any, depth: int = ...): ...
def isClassAdvisor(ob: Any): ...
def determineMetaclass(bases: Any, explicit_mc: Optional[Any] = ...): ...
def minimalBases(classes: Any): ...
def getFrameInfo(frame): ...
def isClassAdvisor(ob): ...
def determineMetaclass(bases, explicit_mc: Incomplete | None = ...): ...
def minimalBases(classes): ...
18 changes: 15 additions & 3 deletions src/zope-stubs/interface/common/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# Stubs for zope.interface.common (Python 3.6)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from _typeshed import Incomplete
from zope.interface import Interface as Interface, classImplements as classImplements
from zope.interface.interface import InterfaceClass as InterfaceClass, fromFunction as fromFunction

class optional:
__doc__: Incomplete
def __init__(self, method) -> None: ...

class ABCInterfaceClass(InterfaceClass):
__name__: Incomplete
__class__: Incomplete
def __init__(self, name, bases, attrs) -> None: ...
def getABC(self): ...
def getRegisteredConformers(self): ...

class ABCInterface(metaclass=ABCInterfaceClass): ...
26 changes: 26 additions & 0 deletions src/zope-stubs/interface/common/builtins.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from _typeshed import Incomplete
from zope.interface.common import collections, io, numbers

class IList(collections.IMutableSequence):
extra_classes: Incomplete
def sort(key: Incomplete | None = ..., reverse: bool = ...) -> None: ...

class ITuple(collections.ISequence):
extra_classes: Incomplete

class ITextString(collections.ISequence):
extra_classes: Incomplete

class IByteString(collections.IByteString):
extra_classes: Incomplete

class INativeString(ITextString): ...

class IBool(numbers.IIntegral):
extra_classes: Incomplete

class IDict(collections.IMutableMapping):
extra_classes: Incomplete

class IFile(io.IIOBase):
extra_classes: Incomplete
88 changes: 88 additions & 0 deletions src/zope-stubs/interface/common/collections.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
from _typeshed import Incomplete
from collections import abc
from zope.interface.common import ABCInterface

class IContainer(ABCInterface):
abc = abc.Container
def __contains__(other) -> bool: ...

class IHashable(ABCInterface):
abc = abc.Hashable

class IIterable(ABCInterface):
abc = abc.Iterable
def __iter__(): ...

class IIterator(IIterable):
abc = abc.Iterator

class IReversible(IIterable):
abc: Incomplete
def __reversed__() -> None: ...

class IGenerator(IIterator):
abc: Incomplete

class ISized(ABCInterface):
abc = abc.Sized

class ICollection(ISized, IIterable, IContainer):
abc: Incomplete

class ISequence(IReversible, ICollection):
abc = abc.Sequence
extra_classes: Incomplete
ignored_classes: Incomplete
def __reversed__() -> None: ...
def __iter__(): ...

class IMutableSequence(ISequence):
abc = abc.MutableSequence
extra_classes: Incomplete

class IByteString(ISequence):
abc: Incomplete

class ISet(ICollection):
abc = abc.Set

class IMutableSet(ISet):
abc = abc.MutableSet

class IMapping(ICollection):
abc = abc.Mapping
extra_classes: Incomplete
ignored_classes: Incomplete

class IMutableMapping(IMapping):
abc = abc.MutableMapping
extra_classes: Incomplete
ignored_classes: Incomplete

class IMappingView(ISized):
abc = abc.MappingView

class IItemsView(IMappingView, ISet):
abc = abc.ItemsView

class IKeysView(IMappingView, ISet):
abc = abc.KeysView

class IValuesView(IMappingView, ICollection):
abc = abc.ValuesView
def __contains__(other) -> bool: ...

class IAwaitable(ABCInterface):
abc: Incomplete

class ICoroutine(IAwaitable):
abc: Incomplete

class IAsyncIterable(ABCInterface):
abc: Incomplete

class IAsyncIterator(IAsyncIterable):
abc: Incomplete

class IAsyncGenerator(IAsyncIterator):
abc: Incomplete
Loading
Loading