Skip to content

Commit

Permalink
Merge pull request #1 from jorenham/dev
Browse files Browse the repository at this point in the history
Improved API, almost-complete documentation, thorough unit tests
  • Loading branch information
jorenham authored Feb 25, 2024
2 parents d7c0dfb + b12c829 commit 614e0b8
Show file tree
Hide file tree
Showing 16 changed files with 1,531 additions and 922 deletions.
523 changes: 517 additions & 6 deletions README.md

Large diffs are not rendered by default.

185 changes: 114 additions & 71 deletions optype/__init__.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,36 @@
__all__ = (
'CanAIter',
'CanANext',
'CanAbs',
'CanAdd',
'CanAenter',
'CanAexit',
'CanAiter',
'CanAnd',
'CanAnext',
'CanAsyncWith',
'CanAwait',
'CanBool',
'CanBuffer',
'CanBytes',
'CanCall',
'CanCeil',
'CanComplex',
'CanContains',
'CanDelattr',
'CanDelete',
'CanDelitem',
'CanDir',
'CanDivmod',
'CanEnter',
'CanEq',
'CanExit',
'CanFloat',
'CanFloor',
'CanFloordiv',
'CanFormat',
'CanGe',
'CanGet',
'CanGetattr',
'CanGetattribute',
'CanGetitem',
'CanGt',
'CanHash',
Expand All @@ -39,7 +53,7 @@
'CanIter',
'CanLe',
'CanLen',
'CanLenHint',
'CanLengthHint',
'CanLshift',
'CanLt',
'CanMatmul',
Expand All @@ -52,7 +66,8 @@
'CanOr',
'CanPos',
'CanPow',
'CanPow0',
'CanPow2',
'CanPow3',
'CanRAdd',
'CanRAnd',
'CanRDivmod',
Expand All @@ -67,49 +82,79 @@
'CanRSub',
'CanRTruediv',
'CanRXor',
'CanReleaseBuffer',
'CanRepr',
'CanReversed',
'CanRound',
'CanRound0',
'CanRound1',
'CanRound2',
'CanRshift',
'CanSet',
'CanSetName',
'CanSetattr',
'CanSetitem',
'CanStr',
'CanSub',
'CanTruediv',
'CanTrunc',
'CanWith',
'CanXor',
'HasAnnotations',
'HasClass',
'HasCode',
'HasDict',
'HasDoc',
'HasFunc',
'HasMatchArgs',
'HasModule',
'HasName',
'HasNames',
'HasQualname',
'HasWeakCallableProxy',
'HasWeakProxy',
'HasWeakReference',
'HasSelf',
'HasSlots',
'HasTypeParams',
'HasWrapped',
'__version__',
)

from importlib import metadata as _metadata

from ._binops import (
from ._can import (
CanAbs,
CanAdd,
CanAenter,
CanAexit,
CanAiter,
CanAnd,
CanAnext,
CanAsyncWith,
CanAwait,
CanBool,
CanBuffer,
CanBytes,
CanCall,
CanCeil,
CanComplex,
CanContains,
CanDelattr,
CanDelete,
CanDelitem,
CanDir,
CanDivmod,
CanEnter,
CanEq,
CanExit,
CanFloat,
CanFloor,
CanFloordiv,
CanLshift,
CanMatmul,
CanMod,
CanMul,
CanOr,
CanPow,
CanPow0,
CanRshift,
CanSub,
CanTruediv,
CanXor,
)
from ._binops_i import (
CanFormat,
CanGe,
CanGet,
CanGetattr,
CanGetattribute,
CanGetitem,
CanGt,
CanHash,
CanIAdd,
CanIAnd,
CanIFloordiv,
Expand All @@ -123,8 +168,27 @@
CanISub,
CanITruediv,
CanIXor,
)
from ._binops_r import (
CanIndex,
CanInt,
CanInvert,
CanIter,
CanLe,
CanLen,
CanLengthHint,
CanLshift,
CanLt,
CanMatmul,
CanMissing,
CanMod,
CanMul,
CanNe,
CanNeg,
CanNext,
CanOr,
CanPos,
CanPow,
CanPow2,
CanPow3,
CanRAdd,
CanRAnd,
CanRDivmod,
Expand All @@ -139,62 +203,41 @@
CanRSub,
CanRTruediv,
CanRXor,
)
from ._cmpops import (
CanEq,
CanGe,
CanGt,
CanLe,
CanLt,
CanNe,
)
from ._containers import (
CanContains,
CanDelitem,
CanGetitem,
CanMissing,
CanSetitem,
)
from ._nullops import (
CanBool,
CanBytes,
CanComplex,
CanFloat,
CanHash,
CanIndex,
CanInt,
CanLen,
CanLenHint,
CanReleaseBuffer,
CanRepr,
CanReversed,
CanRound,
CanRound1,
CanRound2,
CanRshift,
CanSet,
CanSetName,
CanSetattr,
CanSetitem,
CanStr,
CanSub,
CanTruediv,
CanTrunc,
CanWith,
CanXor,
)
from ._specialattrs import (
from ._has import (
HasAnnotations,
HasClass,
HasCode,
HasDict,
HasDoc,
HasFunc,
HasMatchArgs,
HasModule,
HasName,
HasNames,
HasQualname,
HasWeakCallableProxy,
HasWeakProxy,
HasWeakReference,
)
from ._unops import (
CanAIter,
CanANext,
CanAbs,
CanCeil,
CanDir,
CanFloor,
CanInvert,
CanIter,
CanNeg,
CanNext,
CanPos,
CanReversed,
CanRound,
CanRound0,
CanTrunc,
HasSelf,
HasSlots,
HasTypeParams,
HasWrapped,
)


__version__: str = _metadata.version(__package__ or __file__.split('/')[-1])
Loading

0 comments on commit 614e0b8

Please sign in to comment.