Skip to main content

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 truthy literal assert "foo"
assert ...
assert True
ULA002 assert with 0 assert 0
ULA003 assert with None assert None
ULA004 assert with "literal".format(...) assert "foo {0}".format(bar)
ULA005 assert with f-string assert f"foo {bar}"

Testing

I haven't set up proper testing yet, but you can run poetry install and then:

flake8 examples/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flake8-useless-assert-0.4.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flake8_useless_assert-0.4.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file flake8-useless-assert-0.4.0.tar.gz.

File metadata

  • Download URL: flake8-useless-assert-0.4.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.7.12 Linux/5.10.70-1-MANJARO

File hashes

Hashes for flake8-useless-assert-0.4.0.tar.gz
Algorithm Hash digest
SHA256 5a1a13e51f4f4a80ba363c6eb0ddb895465be38a5a4fd63b4c6d944960bf426f
MD5 9c7312402b1170962d6c49539a918598
BLAKE2b-256 aa38aa9c0919c825ac1859c0826bfd31de465a2a3a48671e4d9ae58093253874

See more details on using hashes here.

File details

Details for the file flake8_useless_assert-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flake8_useless_assert-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9c3f38c264ba2d6a77f926c8015e13cc78f188232ab5b178bc8f6bcf529ddc5
MD5 b5505dfc73e3f9fdf5fb3d9e04c0e73d
BLAKE2b-256 1ab628c6c34f422238ab6550cc1548e8eda60e60e96cd0546312d98b5bd386ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page