Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added .pylintrc and disabled on fly checks of python code

  • Loading branch information...
commit 51e3a71b35198169b4724782480e7ba2cad45d12 1 parent a6499c8
Aleksey Maksimov authored

Showing 2 changed files with 267 additions and 3 deletions. Show diff stats Hide diff stats

  1. +239 0 .pylintrc
  2. +28 3 .vimrc
239 .pylintrc
... ... @@ -0,0 +1,239 @@
  1 +[MASTER]
  2 +
  3 +# Specify a configuration file.
  4 +#rcfile=
  5 +
  6 +# Python code to execute, usually for sys.path manipulation such as
  7 +# pygtk.require().
  8 +#init-hook=
  9 +
  10 +# Profiled execution.
  11 +profile=no
  12 +
  13 +# Add <file or directory> to the black list. It should be a base name, not a
  14 +# path. You may set this option multiple times.
  15 +ignore=CVS
  16 +
  17 +# Pickle collected data for later comparisons.
  18 +persistent=yes
  19 +
  20 +# List of plugins (as comma separated values of python modules names) to load,
  21 +# usually to register additional checkers.
  22 +load-plugins=
  23 +
  24 +
  25 +[MESSAGES CONTROL]
  26 +
  27 +# Enable the message, report, category or checker with the given id(s). You can
  28 +# either give multiple identifier separated by comma (,) or put this option
  29 +# multiple time.
  30 +#enable=
  31 +
  32 +# Disable the message, report, category or checker with the given id(s). You
  33 +# can either give multiple identifier separated by comma (,) or put this option
  34 +# multiple time (only on the command line, not in the configuration file where
  35 +# it should appear only once).
  36 +# For human readable description see http://www.logilab.org/3639 or http://pylint-messages.wikidot.com/all-codes
  37 +disable=C0103,C0111,C0301,W0141,W0142,W0232,R0902,R0903,R0904,R0913,R0914
  38 +
  39 +
  40 +[REPORTS]
  41 +
  42 +# Set the output format. Available formats are text, parseable, colorized, msvs
  43 +# (visual studio) and html
  44 +output-format=text
  45 +
  46 +# Include message's id in output
  47 +include-ids=no
  48 +
  49 +# Put messages in a separate file for each module / package specified on the
  50 +# command line instead of printing them on stdout. Reports (if any) will be
  51 +# written in a file name "pylint_global.[txt|html]".
  52 +files-output=no
  53 +
  54 +# Tells whether to display a full report or only the messages
  55 +reports=yes
  56 +
  57 +# Python expression which should return a note less than 10 (10 is the highest
  58 +# note). You have access to the variables errors warning, statement which
  59 +# respectively contain the number of errors / warnings messages and the total
  60 +# number of statements analyzed. This is used by the global evaluation report
  61 +# (RP0004).
  62 +evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
  63 +
  64 +# Add a comment according to your evaluation note. This is used by the global
  65 +# evaluation report (RP0004).
  66 +comment=no
  67 +
  68 +
  69 +[SIMILARITIES]
  70 +
  71 +# Minimum lines number of a similarity.
  72 +min-similarity-lines=4
  73 +
  74 +# Ignore comments when computing similarities.
  75 +ignore-comments=yes
  76 +
  77 +# Ignore docstrings when computing similarities.
  78 +ignore-docstrings=yes
  79 +
  80 +
  81 +[MISCELLANEOUS]
  82 +
  83 +# List of note tags to take in consideration, separated by a comma.
  84 +notes=FIXME,XXX,TODO
  85 +
  86 +
  87 +[BASIC]
  88 +
  89 +# Required attributes for module, separated by a comma
  90 +required-attributes=
  91 +
  92 +# List of builtins function names that should not be used, separated by a comma
  93 +bad-functions=map,filter,apply,input
  94 +
  95 +# Regular expression which should only match correct module names
  96 +module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  97 +
  98 +# Regular expression which should only match correct module level names
  99 +const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
  100 +
  101 +# Regular expression which should only match correct class names
  102 +class-rgx=[A-Z_][a-zA-Z0-9]+$
  103 +
  104 +# Regular expression which should only match correct function names
  105 +function-rgx=[a-z_][a-z0-9_]{2,30}$
  106 +
  107 +# Regular expression which should only match correct method names
  108 +method-rgx=[a-z_][a-z0-9_]{2,30}$
  109 +
  110 +# Regular expression which should only match correct instance attribute names
  111 +attr-rgx=[a-z_][a-z0-9_]{2,30}$
  112 +
  113 +# Regular expression which should only match correct argument names
  114 +argument-rgx=[a-z_][a-z0-9_]{2,30}$
  115 +
  116 +# Regular expression which should only match correct variable names
  117 +variable-rgx=[a-z_][a-z0-9_]{2,30}$
  118 +
  119 +# Regular expression which should only match correct list comprehension /
  120 +# generator expression variable names
  121 +inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
  122 +
  123 +# Good variable names which should always be accepted, separated by a comma
  124 +good-names=i,j,k,ex,Run,_
  125 +
  126 +# Bad variable names which should always be refused, separated by a comma
  127 +bad-names=foo,bar,baz,toto,tutu,tata
  128 +
  129 +# Regular expression which should only match functions or classes name which do
  130 +# not require a docstring
  131 +no-docstring-rgx=__.*__
  132 +
  133 +
  134 +[FORMAT]
  135 +
  136 +# Maximum number of characters on a single line.
  137 +max-line-length=80
  138 +
  139 +# Maximum number of lines in a module
  140 +max-module-lines=1000
  141 +
  142 +# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  143 +# tab).
  144 +indent-string=' '
  145 +
  146 +
  147 +[TYPECHECK]
  148 +
  149 +# Tells whether missing members accessed in mixin class should be ignored. A
  150 +# mixin class is detected if its name ends with "mixin" (case insensitive).
  151 +ignore-mixin-members=yes
  152 +
  153 +# List of classes names for which member attributes should not be checked
  154 +# (useful for classes with attributes dynamically set).
  155 +ignored-classes=SQLObject
  156 +
  157 +# When zope mode is activated, add a predefined set of Zope acquired attributes
  158 +# to generated-members.
  159 +zope=no
  160 +
  161 +# List of members which are set dynamically and missed by pylint inference
  162 +# system, and so shouldn't trigger E0201 when accessed.
  163 +generated-members=REQUEST,acl_users,aq_parent
  164 +
  165 +
  166 +[VARIABLES]
  167 +
  168 +# Tells whether we should check for unused import in __init__ files.
  169 +init-import=no
  170 +
  171 +# A regular expression matching the beginning of the name of dummy variables
  172 +# (i.e. not used).
  173 +dummy-variables-rgx=_|dummy
  174 +
  175 +# List of additional names supposed to be defined in builtins. Remember that
  176 +# you should avoid to define new builtins when possible.
  177 +additional-builtins=
  178 +
  179 +
  180 +[DESIGN]
  181 +
  182 +# Maximum number of arguments for function / method
  183 +max-args=5
  184 +
  185 +# Argument names that match this expression will be ignored. Default to name
  186 +# with leading underscore
  187 +ignored-argument-names=_.*
  188 +
  189 +# Maximum number of locals for function / method body
  190 +max-locals=15
  191 +
  192 +# Maximum number of return / yield for function / method body
  193 +max-returns=6
  194 +
  195 +# Maximum number of branch for function / method body
  196 +max-branchs=12
  197 +
  198 +# Maximum number of statements in function / method body
  199 +max-statements=50
  200 +
  201 +# Maximum number of parents for a class (see R0901).
  202 +max-parents=7
  203 +
  204 +# Maximum number of attributes for a class (see R0902).
  205 +max-attributes=7
  206 +
  207 +# Minimum number of public methods for a class (see R0903).
  208 +min-public-methods=2
  209 +
  210 +# Maximum number of public methods for a class (see R0904).
  211 +max-public-methods=20
  212 +
  213 +
  214 +[CLASSES]
  215 +
  216 +# List of interface methods to ignore, separated by a comma. This is used for
  217 +# instance to not check methods defines in Zope's Interface base class.
  218 +ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
  219 +
  220 +# List of method names used to declare (i.e. assign) instance attributes.
  221 +defining-attr-methods=__init__,__new__,setUp
  222 +
  223 +
  224 +[IMPORTS]
  225 +
  226 +# Deprecated modules which should not be used, separated by a comma
  227 +deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
  228 +
  229 +# Create a graph of every (i.e. internal and external) dependencies in the
  230 +# given file (report RP0402 must not be disabled)
  231 +import-graph=
  232 +
  233 +# Create a graph of external dependencies in the given file (report RP0402 must
  234 +# not be disabled)
  235 +ext-import-graph=
  236 +
  237 +# Create a graph of internal dependencies in the given file (report RP0402 must
  238 +# not be disabled)
  239 +int-import-graph=
31 .vimrc
@@ -81,6 +81,8 @@ set hlsearch " highlight search terms
81 81
82 82 set scrolloff=3 " minimum lines to keep above and below cursor
83 83
  84 +set foldmethod=syntax
  85 +
84 86 function! CleverTab()
85 87 if pumvisible()
86 88 return "\<C-N>"
@@ -133,9 +135,32 @@ let g:EasyGrepRecursive = 1 "'Recursive mode'for EasyGre
133 135 " This command will open all grep results in quickfix window
134 136 autocmd QuickFixCmdPost *grep* cwindow
135 137
136   -let g:pymode_lint_config = "$HOME/pylint.rc"
  138 +let g:pymode_lint_config = "$HOME/.pylintrc"
137 139 " This command is to avoid bug in pylint-mode 0.5.6
138 140 let g:pymode_lint_message = 0
139   -let g:pymode_lint_onfly = 1
  141 +let g:pymode_lint_onfly = 0
140 142 let g:pymode_lint_checker = "pylint"
141   -let g:pymode_rope = 0
  143 +let g:pymode_lint_hold = 1
  144 +
  145 +
  146 +" Fugitive
  147 +nnoremap <leader>gs :Gstatus<CR>
  148 +nnoremap <leader>ga :Gwrite<CR>
  149 +nnoremap <leader>gc :Gcommit %<CR>
  150 +nnoremap <leader>gd :Gdiff<CR>
  151 +nnoremap <leader>gl :Glog<CR>
  152 +nnoremap <leader>gb :Gblame<CR>
  153 +nnoremap <leader>gr :Gremove<CR>
  154 +nnoremap <leader>gpl :Git pull origin master<CR>
  155 +nnoremap <leader>gps :Git push origin master<CR>
  156 +
  157 +noremap <F9> :emenu Git.<TAB>
  158 +menu Git.Status :Gstatus<CR>
  159 +menu Git.Diff :Gdiff<CR>
  160 +menu Git.Commit :Gcommit %<CR>
  161 +menu Git.Checkout :Gread<CR>
  162 +menu Git.Remove :Gremove<CR>
  163 +menu Git.Move :Gmove<CR>
  164 +menu Git.Log :Glog<CR>
  165 +menu Git.Blame :Gblame<CR>
  166 +

0 comments on commit 51e3a71

Please sign in to comment.
Something went wrong with that request. Please try again.