{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/12"},{"label":"Quality Assurance","url":"https://skillfed.io/packages/category/software-development-quality-assurance/2"},{"label":"Documentation","url":"https://skillfed.io/packages/category/software-development-documentation"}],"enrichment":{"capability":"A flake8 extension that enforces a configurable order for class attributes, methods, and nested elements, and detects class-level logic that should be in `__init__`.","skillfed_tags":["flake8-plugin","code-style","class-structure"],"use_cases":["Enforce consistent class structure across a large codebase to improve readability and maintainability.","Catch Django model fields and methods that are out of conventional order in model definitions.","Detect class-level logic (e.g., widget configuration) that belongs in `__init__` but was placed at class scope.","Validate that nested classes like `Meta` appear in the expected position within their parent class.","Integrate class-structure validation into CI/CD pipelines alongside other flake8 checks."],"what_it_does":"This package is a flake8 plugin that validates the internal structure of Python classes by enforcing a consistent order for attributes, methods, and nested elements. It recognizes different attribute types\u2014docstrings, properties, static methods, class methods, nested classes, constants, fields, and regular methods\u2014and checks that they appear in a defined sequence. By default it expects `__new__` and `__init__` first, followed by other magic methods, then properties, static methods, class methods, and regular methods, with protected and private variants ordered separately.\n\nBeyond ordering, it also detects class-level logic (like conditional expressions or attribute modifications) that should typically live in `__init__` instead. The tool is configurable: you can use a strict mode that separates protected and private variants into their own sections, or manually define your own attribute order. It reports violations as CCE001 (wrong order) and CCE002 (class-level expression) errors that integrate into your flake8 workflow.","worth_installing":"Yes, if you value consistent class organization and your team can tolerate aging maintenance. The plugin is stable, has no known vulnerabilities, and solves a real code-style problem. However, verify compatibility with your current flake8 version before adopting. Best suited for teams that already use flake8 and want to standardize class layouts."},"id":"flake8-class-attributes-order","links":{"html":"https://skillfed.io/packages/flake8-class-attributes-order","md":"https://skillfed.io/packages/flake8-class-attributes-order.md","pypi":"https://pypi.org/project/flake8-class-attributes-order/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-03-20","license_spdx":null,"license_treatment":"permissive","name":"flake8-class-attributes-order","python_support":"supports_current","summary":"A flake8 extension that checks classes attributes order"},"popularity":{"monthly_downloads":363191,"position":7226,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.3.0"}
