https://github.com/mytestopia/flake8-qa-style
Flake8 based linter with best-practices for tests
https://github.com/mytestopia/flake8-qa-style
flake8-plugin python testing-tools
Last synced: 6 months ago
JSON representation
Flake8 based linter with best-practices for tests
- Host: GitHub
- URL: https://github.com/mytestopia/flake8-qa-style
- Owner: mytestopia
- License: apache-2.0
- Created: 2023-10-13T06:10:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-13T07:05:51.000Z (over 2 years ago)
- Last Synced: 2025-08-19T03:17:52.635Z (7 months ago)
- Topics: flake8-plugin, python, testing-tools
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# flake8-qa-style
Flake8 based linter with some qa best-practice for writing tests
## Installation
```bash
pip inslall flake8-qa-style
```
## Rules
1. **CS001**: using sleep(1) instead of sleep(var), var - meaningful variable
2. **CS002**: using print()
3. **CS003**: assert same variables: assert var == var
4. **CS004**: assert variable with constant: assert var == 1
5. **CS005**: missing type annotation for argument in function
6. **CS006**: missing function return type annotation
**Rules configuration**
```editorconfig
[flake8]
;for methods with @property decorator skip CS006
skip_property_return_annotation = true
```
## Configuration
Flake8-qa-style is flake8 plugin, so the configuration is the same as [flake8 configuration](https://flake8.pycqa.org/en/latest/user/configuration.html).
You can ignore rules via
- file `setup.cfg`: parameter `ignore`
```editorconfig
[flake8]
ignore = CS001
```
- comment in code `#noqa: CS001`