Annotation Type Hints#

colour.hints

Any(*args, **kwargs)

Special type indicating an unconstrained type.

ArrayLike

Callable

Deprecated alias to collections.abc.Callable.

cast(typ, val)

Cast a value to a type.

ClassVar

Special type construct to mark class variables.

Dataclass

Dict

A generic version of dict.

Domain1

Runtime representation of an annotated type.

Domain10

Runtime representation of an annotated type.

Domain100

Runtime representation of an annotated type.

Domain360

Runtime representation of an annotated type.

Domain100_100_360

Runtime representation of an annotated type.

DType

Represent a PEP 604 union type

DTypeBoolean

DTypeComplex

Represent a PEP 604 union type

DTypeFloat

Represent a PEP 604 union type

DTypeInt

Represent a PEP 604 union type

DTypeReal

Represent a PEP 604 union type

Generator()

Iterable()

Iterator()

List

A generic version of list.

Literal

Special typing form to define literal types (a.k.a.

LiteralCCTFDecoding

LiteralCCTFEncoding

LiteralChromaticAdaptationTransform

LiteralColourspaceModel

LiteralDeltaEMethod

LiteralEOTF

LiteralEOTFInverse

LiteralFontScaling

LiteralLogDecoding

LiteralLogEncoding

LiteralLUTReadMethod

LiteralLUTWriteMethod

LiteralOETF

LiteralOETFInverse

LiteralOOTF

LiteralOOTFInverse

LiteralRGBColourspace

LiteralWarning

Mapping()

A Mapping is a generic container for associating key/value pairs.

ModuleType

NDArray

ndarray(shape, dtype=float, buffer=None, offset=0,

NDArrayBoolean

ndarray(shape, dtype=float, buffer=None, offset=0,

NDArrayComplex

ndarray(shape, dtype=float, buffer=None, offset=0,

NDArrayFloat

ndarray(shape, dtype=float, buffer=None, offset=0,

NDArrayInt

ndarray(shape, dtype=float, buffer=None, offset=0,

NDArrayReal

ndarray(shape, dtype=float, buffer=None, offset=0,

NDArrayStr

ndarray(shape, dtype=float, buffer=None, offset=0,

NewType(name, tp)

NewType creates simple unique types with almost zero runtime overhead.

NoReturn

Special type indicating functions that never return.

overload(func)

Decorator for overloaded functions/methods.

PathLike()

Abstract base class for implementing the file system path protocol.

Protocol()

Base class for protocol classes.

ProtocolExtrapolator(*args, **kwargs)

ProtocolInterpolator(*args, **kwargs)

ProtocolLUTSequenceItem(*args, **kwargs)

Range1

Runtime representation of an annotated type.

Range10

Runtime representation of an annotated type.

Range100

Runtime representation of an annotated type.

Range360

Runtime representation of an annotated type.

Range100_100_360

Runtime representation of an annotated type.

Real

Represent a PEP 604 union type

RegexFlag

NewType creates simple unique types with almost zero runtime overhead.

runtime_checkable(cls)

Mark a protocol class as a runtime protocol.

Self

Used to spell the type of "self" in classes.

Sequence()

All the operations on a read-only sequence.

Set

A generic version of set.

SupportsIndex(*args, **kwargs)

An ABC with one abstract method __index__.

TextIO()

Typed version of the return of open() in text mode.

Tuple

Deprecated alias to builtins.tuple.

Type

Deprecated alias to builtins.type.

TypedDict(typename[, fields, total])

A simple typed namespace.

TypeVar(name, *constraints[, bound, ...])

Type variable.