From 08fced9646c7edfa61c21280152f7c6bd76df5b6 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 4 Oct 2011 10:55:16 -0400 Subject: [PATCH] ENH: added a .pylintrc to help with consistent appearance and catch obvious problems --- .pylintrc | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .pylintrc diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 00000000..ba38f23d --- /dev/null +++ b/.pylintrc @@ -0,0 +1,37 @@ +# Custom pylint configuration for the Fail2Ban project +# +# Set your PYLINTRC environment variable to point to this file +# e.g. +# export PYLINTRC=$PWD/.pylintrc + +[FORMAT] +indent-string='\t' + +[BASIC] +# Fail2Ban uses non-conventional to Python world camel-casing +# These regexps were originally borrowed from 0.4.x series of +# PyMVPA which had similar conventions. + +# Regular expression which should only match correct module names +module-rgx=(([a-z][a-z0-9_]*)|([A-Z][a-zA-Z0-9_]+))$ + +attr-rgx=[a-z_][a-zA-Z0-9_]{2,30} + +# Regular expression which should only match correct class names +class-rgx=[A-Z_]+[a-zA-Z0-9]+$ + +# Regular expression which should only match correct function names +function-rgx=[a-z_]+[a-z_][a-zA-Z0-9]*$ + +# Regular expression which should only match correct method names +method-rgx=([a-z_]|__)[a-zA-Z0-9]*(__)?$ + +# Regular expression which should only match correct argument names +argument-rgx=[a-z][a-zA-Z0-9]*_*[a-zA-Z0-9]*_*[a-zA-Z0-9]*_?$ + +# Regular expression which should only match correct variable names +variable-rgx=([a-z_]+[a-zA-Z0-9]*_*[a-zA-Z0-9]*_*[a-zA-Z0-9]*_?||(__.*__))$||[A-Z] + +# Regular expression which should only match correct module level names +# Default: (([A-Z_][A-Z1-9_]*)|(__.*__))$ +const-rgx=([a-z_]+[a-zA-Z0-9]*_*[a-zA-Z0-9]*_*[a-zA-Z0-9]*_?|__.*__)$||[A-Z]