Skip to content

Commit

Permalink
Merge pull request #63 from GammaGames/short-messages
Browse files Browse the repository at this point in the history
use shorter messages
  • Loading branch information
gforcada committed May 14, 2020
2 parents fac8ea7 + 96abd52 commit 3873642
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Expand Up @@ -6,7 +6,7 @@ Changelog
1.5.3 (unreleased)
------------------

- Nothing changed yet.
- Change messages to have shorter text


1.5.2 (2020-03-16)
Expand Down
12 changes: 6 additions & 6 deletions README.rst
Expand Up @@ -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
-------
Expand Down
9 changes: 3 additions & 6 deletions flake8_builtins.py
Expand Up @@ -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
Expand Down

0 comments on commit 3873642

Please sign in to comment.