Skip to main content

flake8-useless-assert

flake8 plugin to catch useless assert statements

Download or install on the PyPI page

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}"
ULA006 assert with constant computation assert "foo" == "bar" * 3
assert repr("fizz") == "'buzz'"

Testing

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

flake8 examples/

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.4.tar.gz (4.6 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.4-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for flake8-useless-assert-0.4.4.tar.gz
Algorithm Hash digest
SHA256 336bcc5e558fee11593b4294ccda46777eb873cb4445e51a0edeecf9d8517b42
MD5 931559ade43104ec47d215967e278e5a
BLAKE2b-256 1c49e339616bb19e784dabeacb9f009146daeb07713c58576f92ffb5dd91bc08

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flake8_useless_assert-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3f1c0c579eaaf008721bc0d0db2e3391355a8dacd06b5ac63c1bab0c9e29e51f
MD5 a152f92c80c447f89c2a7298488b0010
BLAKE2b-256 39a4005ea50e98f2a63d0e568fc0fefab0aa408781d5a0d3b8571f36c80b9401

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.4 This release

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.3

2 files

0.1.1

2 files

Supported by

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