Flake8 plugin to check class attributes order
Project description
flake8-cls-attr-order
A flake8 plugin that checks class attributes for the proper alphabetical order.
Tools
Production
- python 3.7+
- flake8
Development
Usage
# cls.py
class Foo:
BAR = ()
ABRA = {}
flake8 cls.py
cls.py:1:1: CL200 wrong "Foo" class constants order, should be "ABRA, BAR"
Installation
pip install flake8-cls-attr-order
✨ 🍰 ✨
Source code
git clone git@github.com:vyahello/flake8-cls-attr-order.git
cd flake8-cls-attr-order
python3 -m venv venv
. venv/bin/activate
pip install -e .
Warnings
CL100
- class name should start with upper case letter.CL200
- wrong class constants order.
Development notes
Testing
Unit tests
Please run the following script to start plugin unit tests:
pytest
Package tests
Please run the following script to start plugin package tests:
bats test-package.bats
CI
To be able to run code analysis, please execute command below:
./analyse-source-code.sh
Meta
Author – Vladimir Yahello.
Distributed under the MIT
license. See license for more information.
You can reach out me at:
- vyahello@gmail.com
- https://twitter.com/vyahello
- https://www.linkedin.com/in/volodymyr-yahello-821746127
Contributing
I would highly appreciate any contribution and support. If you are interested to add your ideas into project please follow next simple steps:
- Clone the repository
- Configure
git
for the first time after cloning with yourname
andemail
pip install -r requirements.txt
to install all project dependenciespip install -r requirements-dev.txt
to install all development project dependencies- Create your feature branch (git checkout -b feature/fooBar)
- Commit your changes (git commit -am 'Add some fooBar')
- Push to the branch (git push origin feature/fooBar)
- 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for flake8_cls_attr_order-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8c60ba167a596cbf1ef1a807056e1b4d1b7d15c43b8360be06aed000248f63c |
|
MD5 | cc77a2bb8bbdc0638d4b4badaa17725e |
|
BLAKE2b-256 | 3689a7e22d2c0eeb5f57ece619f87474bd836e2f64414a02956210135fd08a0e |