Typing Protocols for Precise Type Hints in Python 3.12+
BSD-3-CLAUSE License
The minimum required Python version has been lowered from 3.12 to 3.10.
basedpyright
to 1.10.0 by @jorenham in https://github.com/jorenham/optype/pull/41
CONTRIBUTING.md
and CODE_OF_CONDUCT.md
by @jorenham in https://github.com/jorenham/optype/pull/45
Full Changelog: https://github.com/jorenham/optype/compare/v0.3.1...v0.4.0
Published by jorenham 7 months ago
Full Changelog: https://github.com/jorenham/optype/compare/v0.3.0...v0.3.1
Published by jorenham 7 months ago
CanAIterSelf
not being an AsyncGenerator
subtype by @jorenham in https://github.com/jorenham/optype/pull/17
__reversed__
and __missing__
by @jorenham in https://github.com/jorenham/optype/pull/28
CanSequence[I: CanIndex, V]
(combines CanLen
and CanGetitem[I, V]
)do_reversed: DoesReversed
(type-corrected alias for builtins.reversed
)do_missing: DoesMissing
(calls .__missing__()
)copy
standard library by @jorenham in https://github.com/jorenham/optype/pull/29
CanCopy[T]
and CanCopySelf
CanDeepcopy[T]
and CanDeepcopySelf
CanReplace[T, V]
and CanReplaceSelf[V]
pickle
standard library by @jorenham in https://github.com/jorenham/optype/pull/30
CanReduce[R: str | tuple]
CanReduceEx[R: str | tuple]
CanGetState[S]
CanSetState[S]
CanGetnewargs[*Args]
CanGetnewargsEx[*Args, Kw]
dataclasses
standard library by @jorenham in https://github.com/jorenham/optype/pull/32
HasDataclassFields
Full Changelog: https://github.com/jorenham/optype/compare/v0.2.2...v0.3.0
Published by jorenham 8 months ago
optype.do_ne
annotation by @jorenham in https://github.com/jorenham/optype/pull/10
optype.DoesIMod
annotation by @jorenham in https://github.com/jorenham/optype/pull/11
Can*
types by @jorenham in https://github.com/jorenham/optype/pull/13
CanIterSelf[+V]
and CanAIterSelf[+V]
by @jorenham in https://github.com/jorenham/optype/pull/14
__len__
and __length_hint__
by @jorenham in https://github.com/jorenham/optype/pull/15
Full Changelog: https://github.com/jorenham/optype/compare/v0.2.1...v0.2.2
Published by jorenham 8 months ago
do_bool: DoesBool
do_int: DoesInt
do_float: DoesFloat
do_complex: DoesComplex
do_bytes: DoesBytes
do_str: DoesStr
examples/
directoryFull Changelog: https://github.com/jorenham/optype/compare/v0.2.0...v0.2.1
Published by jorenham 8 months ago
optype.do_*
, so that optype
> operator
optype.Does*
CanA{name}
types as CanA{Name}
, improving readabilityFull Changelog: https://github.com/jorenham/optype/compare/v0.1.0...v0.2.0
Published by jorenham 8 months ago
The official first release of optype
🎉.
Full Changelog: https://github.com/jorenham/optype/commits/v0.1.0