From 96abd520cd28458090147e7aa49ac251bc0ba584 Mon Sep 17 00:00:00 2001 From: GammaGames Date: Tue, 12 May 2020 23:07:24 -0600 Subject: [PATCH] use shorter messages --- CHANGES.rst | 2 +- README.rst | 12 ++++++------ flake8_builtins.py | 9 +++------ 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 0b7f50d..ede2255 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,7 +6,7 @@ Changelog 1.5.3 (unreleased) ------------------ -- Nothing changed yet. +- Change messages to have shorter text 1.5.2 (2020-03-16) diff --git a/README.rst b/README.rst index a2f9078..a212464 100644 --- a/README.rst +++ b/README.rst @@ -60,12 +60,12 @@ Given the following code: The following warnings are shown (via flake8):: - test.py:1:15: A002 "object" is used as an argument and thus shadows a python builtin, consider renaming the argument - test.py:1:23: A002 "list" is used as an argument and thus shadows a python builtin, consider renaming the argument - test.py:1:29: A002 "dict" is used as an argument and thus shadows a python builtin, consider renaming the argument - test.py:2:5: A001 "max" is a python builtin and is being shadowed, consider renaming the variable - test.py:3:5: A001 "min" is a python builtin and is being shadowed, consider renaming the variable - test.py:4:5: A001 "zip" is a python builtin and is being shadowed, consider renaming the variable + test.py:1:15: A002 argument "object" is shadowing a python builtin + test.py:1:23: A002 argument "list" is shadowing a python builtin + test.py:1:29: A002 argument "dict" is shadowing a python builtin + test.py:2:5: A001 variable "max" is shadowing a python builtin + test.py:3:5: A001 variable "min" is shadowing a python builtin + test.py:4:5: A001 variable "zip" is shadowing a python builtin Install ------- diff --git a/flake8_builtins.py b/flake8_builtins.py index b39800b..1b20225 100644 --- a/flake8_builtins.py +++ b/flake8_builtins.py @@ -49,12 +49,9 @@ class BuiltinsChecker(object): name = 'flake8_builtins' version = '1.5.2' - assign_msg = 'A001 "{0}" is a python builtin and is being shadowed, ' \ - 'consider renaming the variable' - argument_msg = 'A002 "{0}" is used as an argument and thus shadows a ' \ - 'python builtin, consider renaming the argument' - class_attribute_msg = 'A003 "{0}" is a python builtin, consider ' \ - 'renaming the class attribute' + assign_msg = 'A001 variable "{0}" is shadowing a python builtin' + argument_msg = 'A002 argument "{0}" is shadowing a python builtin' + class_attribute_msg = 'A003 class attribute "{0}" is shadowing a python builtin' def __init__(self, tree, filename): self.tree = tree