https://github.com/asottile-archive/flake8-walrus
flake8 plugin which forbids assignment expressions (the walrus operator)
https://github.com/asottile-archive/flake8-walrus
flake8
Last synced: about 1 year ago
JSON representation
flake8 plugin which forbids assignment expressions (the walrus operator)
- Host: GitHub
- URL: https://github.com/asottile-archive/flake8-walrus
- Owner: asottile-archive
- License: mit
- Archived: true
- Created: 2019-08-03T20:15:04.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2024-02-04T18:35:18.000Z (over 2 years ago)
- Last Synced: 2025-04-24T10:04:10.068Z (about 1 year ago)
- Topics: flake8
- Language: Python
- Size: 164 KB
- Stars: 46
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-flake8-extensions - flake8-walrus - Report walrus operator (`:=`). (Limitations)
README
# ARCHIVED
it is feature complete and I don't plan on updating it further
___
[](https://github.com/asottile/flake8-walrus/actions/workflows/main.yml)
[](https://results.pre-commit.ci/latest/github/asottile/flake8-walrus/main)
flake8-walrus
================
flake8 plugin which forbids assignment expressions (the walrus operator)
## installation
```bash
pip install flake8-walrus
```
## flake8 codes
| Code | Description |
|--------|-----------------------------------|
| ASN001 | do not use assignment expressions |
## rationale
lol
## as a pre-commit hook
See [pre-commit](https://github.com/pre-commit/pre-commit) for instructions
Sample `.pre-commit-config.yaml`:
```yaml
- repo: https://github.com/pycqa/flake8
rev: 3.8.1
hooks:
- id: flake8
additional_dependencies: [flake8-walrus==1.1.0]
```