Auto-walrus

Latest version: v0.3.4

Safety actively analyzes 688587 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.3.4

None

0.3.3

None

0.2.1

What's new: don't rewrite lines with comments (e.g. ` type: ignore`, ` noqa`, etc. ... best to just leave them alone)

Install with
console
$ pip install auto-walrus


Or use as pre-commit hook:

yaml
- repo: https://github.com/MarcoGorelli/auto-walrus
rev: v0.2.1
hooks:
- id: auto-walrus

0.1.9

Only rewrite if the variable is only used within the if-statement's body (idea from https://github.com/python-graphblas/python-graphblas/pull/287#issuecomment-1276423820)

Hopefully this is now kinda stable and I can calm down with the releases 😄

Install with
console
$ pip install auto-walrus


Or use as pre-commit hook:

yaml
- repo: https://github.com/MarcoGorelli/auto-walrus
rev: v0.1.9
hooks:
- id: auto-walrus

0.1.8

Bug-fix release - don't rewrite `while` loops as it can be unsafe

Install with
console
$ pip install auto-walrus


Or use as pre-commit hook:

yaml
- repo: https://github.com/MarcoGorelli/auto-walrus
rev: v0.1.8
hooks:
- id: auto-walrus

0.1.7

Bug-fix release - only rewrite when test is simple, add option to exclude lines with ` no-walrus`, performance improvement

Install with
console
$ pip install auto-walrus


Or use as pre-commit hook:

yaml
- repo: https://github.com/MarcoGorelli/auto-walrus
rev: v0.1.7
hooks:
- id: auto-walrus

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.