flake8 plugin to catch useless `assert` statements
Project description
flake8-useless-assert
flake8 plugin to catch useless assert
statements
Violations
Code | Description | Example |
---|---|---|
ULA001 | assert with a literal |
assert "foo" |
assert ... |
||
True |
||
ULA002 | assert with a formatted string |
assert "foo {0}".format(bar) |
assert f"foo {bar}" |
Note that assert False
is exempt from ULA001
because it's a common idiom.
Testing
I haven't set up proper testing yet, but you can run poetry install
and then:
flake8 examples/
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 Distribution
Built Distribution
Close
Hashes for flake8-useless-assert-0.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff60bb2f46cad1460836a78e0c67d099efd866c3911ee958eb331daa12c8ec45 |
|
MD5 | 2444c4d2c5f3e2be3133c091d5a63f3a |
|
BLAKE2b-256 | b04df88d96ba3a020a16d5eb4107466a3c88a3df698dea419395c1c91f760e4a |
Close
Hashes for flake8_useless_assert-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b10cf08e0e62618c4bcbb63d5818c27d32dff3a5e9a51d8c3a3fcb48d9eb9ce |
|
MD5 | a31bf5737399591fd6602f09592d0bc8 |
|
BLAKE2b-256 | 3711a9914a28d30f734fb295b92aa293668660ce1f07e5c7654ed4241b95d45e |