From aa3c351dfc98812665a557dd6c3dff631bbdba71 Mon Sep 17 00:00:00 2001 From: Sam Warner Date: Wed, 19 Oct 2022 13:58:43 +1100 Subject: [PATCH] Make bugbear slightly more polite (#298) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * make bugbear slightly more polite Bugbear is great at catching bugs in our code, but can come across a bit rude when commenting on pull requests 😂 Obviously it's a robot, but we like to encourage polite discourse * Update bugbear.py Co-authored-by: Cooper Lees Co-authored-by: Cooper Lees --- bugbear.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bugbear.py b/bugbear.py index be299a4..8572908 100644 --- a/bugbear.py +++ b/bugbear.py @@ -1192,8 +1192,8 @@ def visit_Lambda(self, node): } B015 = Error( message=( - "B015 Pointless comparison. This comparison does nothing but waste " - "CPU instructions. Either prepend `assert` or remove it." + "B015 Result of comparison is not used. This line doesn't do" + "anything. Did you intend to prepend it with assert?" ) ) B016 = Error( @@ -1213,7 +1213,8 @@ def visit_Lambda(self, node): ) B018 = Error( message=( - "B018 Found useless expression. Either assign it to a variable or remove it." + "B018 Found useless expression. Consider either assigning it to a " + "variable or removing it." ) ) B019 = Error(