Skip to the content.


made-with-python Coverage Status Code style: black Checked with flake8 Imports: isort License PyPI version PyPI pyversions PyPi downloads Downloads EO principles respected here


A flake8 plugin that checks class attributes for the proper alphabetical order.






pip install flake8-cls-attr-order
✨ 🍰 ✨

Source code

git clone
cd flake8-cls-attr-order
python3 -m venv venv 
. venv/bin/activate
pip install -e .





class foo:
    BAR = ()
    ABRA = {}

    def smethod(): ...

    def bmethod(self): ...

    def amethod(self): ...

    def pmethod(self): ...

    def cmethod(cls): ...
flake8 CL100 "foo" class name should start with upper case letter CL101 wrong "foo" class constants order, should be "ABRA, BAR" CL201 wrong "foo" class methods order. Comply with @property, @classmethod, @staticmethod, instance methods. Should be "pmethod, cmethod, smethod, amethod, bmethod" CL200 "smethod" @staticmethod is detected, should be converted to function

⬆ back to top

Development notes


Unit tests

Please run the following script to start plugin unit tests:


Package tests

Please run the following script to start plugin package tests:

bats test-package.bats 


To be able to run code analysis, please execute command below:



Author – Vladimir Yahello.

Distributed under the MIT license. See license for more information.

You can reach out me at:


I would highly appreciate any contribution and support. If you are interested to add your ideas into project please follow next simple steps:

  1. Clone the repository
  2. Configure git for the first time after cloning with your name and email
  3. pip install -r requirements.txt to install all project dependencies
  4. pip install -r requirements-dev.txt to install all development project dependencies
  5. Create your feature branch (git checkout -b feature/fooBar)
  6. Commit your changes (git commit -am β€˜Add some fooBar’)
  7. Push to the branch (git push origin feature/fooBar)
  8. Create a new Pull Request

What’s next

All recent activities and ideas are described at project issues page. If you have ideas you want to change/implement please do not hesitate and create an issue.

⬆ back to top