From b6a064bd0ff0ae8e22d4b37607ac6908f883776a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 11 Oct 2016 21:18:17 +0300 Subject: revert most of the recent Pylint fixes I know better how to name my things. --- .pylintrc | 3 +-- bin/shift.py | 6 +++--- bin/utils/cmd_line.py | 8 ++++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.pylintrc b/.pylintrc index 03ab69b..5ff2744 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,13 +1,12 @@ [MESSAGES CONTROL] #disable=old-ne-operator,filter-builtin-not-iterating,nonzero-method,long-builtin,unpacking-in-except,backtick,suppressed-message,setslice-method,round-builtin,coerce-builtin,input-builtin,raising-string,raw_input-builtin,apply-builtin,delslice-method,useless-suppression,hex-method,zip-builtin-not-iterating,range-builtin-not-iterating,intern-builtin,old-octal-literal,xrange-builtin,no-absolute-import,cmp-builtin,reduce-builtin,next-method-called,getslice-method,oct-method,reload-builtin,dict-view-method,file-builtin,long-suffix,parameter-unpacking,dict-iter-method,cmp-method,old-division,using-cmp-argument,buffer-builtin,old-raise-syntax,indexing-exception,unicode-builtin,unichr-builtin,coerce-method,basestring-builtin,map-builtin-not-iterating,metaclass-assignment,print-statement,import-star-module-level,standarderror-builtin,execfile-builtin -disable=bad-whitespace,duplicate-code,missing-docstring,multiple-statements +disable=bad-whitespace,duplicate-code,invalid-name,missing-docstring,multiple-statements [BASIC] #bad-functions=map,filter #good-names=i,j,k,ex,Run,_ -good-names=i,j,n,x,y #bad-names=foo,bar,baz,toto,tutu,tata #name-group= #include-naming-hint=no diff --git a/bin/shift.py b/bin/shift.py index b837c53..94db333 100644 --- a/bin/shift.py +++ b/bin/shift.py @@ -25,11 +25,11 @@ def _main_shift( else: image.save(output_path, output) -def _parse_direction(src): +def _parse_direction(s): try: - return Direction(src) + return Direction(s) except ValueError: - raise argparse.ArgumentTypeError('invalid direction: ' + src) + raise argparse.ArgumentTypeError('invalid direction: ' + s) def _parse_args(args=sys.argv): parser = argparse.ArgumentParser( diff --git a/bin/utils/cmd_line.py b/bin/utils/cmd_line.py index 43f7bca..02c596c 100644 --- a/bin/utils/cmd_line.py +++ b/bin/utils/cmd_line.py @@ -5,11 +5,11 @@ import argparse -def parse_non_negative_integer(src): +def parse_non_negative_integer(s): try: - n = int(src) + n = int(s) except ValueError: - raise argparse.ArgumentTypeError('must be a non-negative integer: ' + src) + raise argparse.ArgumentTypeError('must be a non-negative integer: ' + s) if n < 0: - raise argparse.ArgumentTypeError('must be a non-negative integer: ' + src) + raise argparse.ArgumentTypeError('must be a non-negative integer: ' + s) return n -- cgit v1.2.3