Skip to main content

flake8-assert-msg

flake8 plugin which forbids assert statements without messages.

Installation

pip install flake8-assert-msg

flake8 codes

Code Description
ASS001 do not use bare asserts

Rationale

This ensures that assertions have clear messages for failures. Adding a message to an assertion also acts as documentation for why the assertion is present.

As a pre-commit hook

See pre-commit for instructions

Sample .pre-commit-config.yaml:

-   repo: https://gitlab.com/pycqa/flake8
    rev: 3.8.1
    hooks:
    -   id: flake8
        additional_dependencies: [flake8-assert-msg==1.1.1]

Acknowledgements

Release files for flake8-assert-msg 1.1.1

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-assert-msg 1.1.1
File Size Uploaded
flake8_assert_msg-1.1.1.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flake8-assert-msg 1.1.1
File Interpreter ABI Platform
flake8_assert_msg-1.1.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 7.0 kB

Release files / flake8_assert_msg-1.1.1.tar.gz

Download URL flake8_assert_msg-1.1.1.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
96204f4a13f8f4a006c0d6583b68e137b785a9a140072456bdb12881fbece29e
BLAKE2b-256 checksum
How to use checksums
c8a1e4d211d12cd29271a2a726349a4d29864c38c08b06e504f8d6163f0b0358
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5

Release files / flake8_assert_msg-1.1.1-py2.py3-none-any.whl

Download URL flake8_assert_msg-1.1.1-py2.py3-none-any.whl
Size 3.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0279e2415aea18ced58c057de4f1d9eff8b3e7444304356e2fc8d34196882123
BLAKE2b-256 checksum
How to use checksums
64645aa9f5c84627622539eca3c8c26490bec2a9d51ee2c1135ae3e45dccdff4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

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