You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several classes (Renderer, Allocator, …) have a factory function which does not use the passed cls argument at all, they can be decorated with @staticmethod without any difference.
@classmethoddefautocreate(cls, backend: Backend, renderer: Renderer) ->Allocator:
"""Creates the adequate allocator given a backend and a renderer."""ret=lib.wlr_allocator_autocreate(backend._ptr, renderer._ptr)
ifnotret:
raiseRuntimeError("Unable to create an allocator.")
returnAllocator(ret)
The text was updated successfully, but these errors were encountered:
Several classes (Renderer, Allocator, …) have a factory function which does not use the passed
cls
argument at all, they can be decorated with@staticmethod
without any difference.Example:
pywlroots/wlroots/allocator.py
Line 21 in b38b6ce
The text was updated successfully, but these errors were encountered: