Skip to content

typing

Re-export from ffmpeg_core.utils.typing.

Functions:

Name Description
override

Indicate a method that overrides a method in a superclass.

override

override(func: V) -> V

Indicate a method that overrides a method in a superclass.

This decorator serves as a placeholder until Python 3.12, which introduces a built-in @override decorator. Using this decorator helps with code clarity and can catch errors where a method intended to override a parent class method doesn't actually override anything (e.g., due to a typo in the method name).

Parameters:

Name Type Description Default
func V

The function to mark as an override of a superclass method

required

Returns:

Type Description
V

The original function, unchanged (the decorator is used only for documentation)

Example
class Parent:
    def method(self):
        pass


class Child(Parent):
    @override
    def method(self):  # Correctly overrides Parent.method
        pass