Skip to content

ALL-CLAS0001 · evidence

This page continues ALL-CLAS0001 directly from its source docstring. Read its implementation.

Each finding names the class, its range in the file, and the first member that sits somewhere other than where the declared order puts it, beside how many members the class declares and how many of them are out of place. The review repair moves the first displaced method to its expected position and preserves its source exactly. Lifecycle names, visibility order, and kind order are all configurable, and a member whose visibility or kind is left out of the configured order sorts after every configured one. visibility_order and kind_order are the two sorts applied after the lifecycle names, so a project that puts protected members first or class methods before properties states that order rather than accepting this one. The value is the number of classes whose declared order differs from the expected one.

Decorators execute while a class body is built, and one declaration can refer to an earlier descriptor. The fix therefore requires review instead of applying as a safe edit. Keep required adjacency or execution order by splitting the class or introducing named regions. Disable WPS338 and CCE001 when this rule owns the same class. Alphabetical order is a project preference rather than a language requirement.