graphite-project / carbon

Carbon is one of the components of Graphite, and is responsible for receiving metrics over the network and writing them down to disk using a storage backend.
http://graphite.readthedocs.org/
Apache License 2.0
1.5k stars 490 forks source link

(BAN-B101) Assert statement used outside of tests #906

Closed rohankhanna closed 3 years ago

rohankhanna commented 3 years ago

Description

Usage of assert statement in application logic is discouraged. assert is removed with compiling to optimised byte code (python -o producing *.pyo files). Consider raising an exception instead. Ideally, assert statement should be used only in tests. Tip: Make sure test_patterns are defined in .deepsource.toml to avoid false-positives - https://deepsource.io/docs/config/deepsource-toml.html#test-patterns

Occurrences

There are 4 occurrences of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/graphite-project/carbon/issue/BAN-B101/occurrences/