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

Download files

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

Source Distribution

flake8_assert_msg-1.1.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

flake8_assert_msg-1.1.1-py2.py3-none-any.whl (3.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file flake8_assert_msg-1.1.1.tar.gz.

File metadata

  • Download URL: flake8_assert_msg-1.1.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for flake8_assert_msg-1.1.1.tar.gz
Algorithm Hash digest
SHA256 96204f4a13f8f4a006c0d6583b68e137b785a9a140072456bdb12881fbece29e
MD5 4e8c88fafaa55c2f6be0c71e73b585ec
BLAKE2b-256 c8a1e4d211d12cd29271a2a726349a4d29864c38c08b06e504f8d6163f0b0358

See more details on using hashes here.

File details

Details for the file flake8_assert_msg-1.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: flake8_assert_msg-1.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using 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

File hashes

Hashes for flake8_assert_msg-1.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0279e2415aea18ced58c057de4f1d9eff8b3e7444304356e2fc8d34196882123
MD5 7f5e81831bc4f5dab74ac67d02930a70
BLAKE2b-256 64645aa9f5c84627622539eca3c8c26490bec2a9d51ee2c1135ae3e45dccdff4

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 files

1.1.0

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