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/

Metadata

Release files for flake8-useless-assert 0.4.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flake8-useless-assert 0.4.4
File Size Uploaded
flake8-useless-assert-0.4.4.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flake8-useless-assert 0.4.4
File Interpreter ABI Platform
flake8_useless_assert-0.4.4-py3-none-any.whl Python 3 none any Details

Total release size: 10.4 kB

Release files / flake8-useless-assert-0.4.4.tar.gz

Download URL flake8-useless-assert-0.4.4.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
336bcc5e558fee11593b4294ccda46777eb873cb4445e51a0edeecf9d8517b42
BLAKE2b-256 checksum
How to use checksums
1c49e339616bb19e784dabeacb9f009146daeb07713c58576f92ffb5dd91bc08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.7.12 Linux/5.10.161-1-MANJARO

Release files / flake8_useless_assert-0.4.4-py3-none-any.whl

Download URL flake8_useless_assert-0.4.4-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f1c0c579eaaf008721bc0d0db2e3391355a8dacd06b5ac63c1bab0c9e29e51f
BLAKE2b-256 checksum
How to use checksums
39a4005ea50e98f2a63d0e568fc0fefab0aa408781d5a0d3b8571f36c80b9401
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.7.12 Linux/5.10.161-1-MANJARO

Release history Release notifications | RSS feed

This release

0.4.4 This release

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page