
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
flake8-useless-assert
Advanced tools
flake8 plugin to catch useless assert
statements
Download or install on the PyPI page
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'" |
I haven't set up proper testing yet, but you can run poetry install
and then:
flake8 examples/
FAQs
flake8 plugin to catch useless `assert` statements
We found that flake8-useless-assert demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.