Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use shorter messages #63

Merged
merged 1 commit into from May 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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