Commit 2d197e51 authored by Vincent Pelletier's avatar Vincent Pelletier

Allow functions to start with more than one underscore (and update methods too).

Simplify method regex.
Allow method names to be used as local variables.
Allow any naming at global level (to be restricted later, when protocol.py content will be accepted by pylint and when decorators will be removed).


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@969 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent b81e3477
......@@ -19,9 +19,19 @@ max-public-methods=100
# Inspired by Debian's /usr/share/doc/pylint/examples/pylintrc_camelcase
module-rgx=(([a-z][a-z0-9]*)|([A-Z][a-zA-Z0-9]+))$
class-rgx=[A-Z][a-zA-Z0-9]+$
function-rgx=[a-z_](([a-zA-Z0-9]*)|([a-z0-9_]*))$
method-rgx=(([a-z_](([a-zA-Z0-9]*)|([a-z0-9_]*)))|(__[a-z]*__))$
function-rgx=((_+|[a-z]))(([a-zA-Z0-9]*)|([a-z0-9_]*))$
method-rgx=((((_+|[a-z]))(([a-zA-Z0-9]*)|([a-z0-9_]*)))|(__.*__))$
argument-rgx=[a-z][a-z0-9_]*$
variable-rgx=[a-z][a-z0-9_]*$
# variables can be:
# - variables ([a-z][a-z0-9_]*$)
# - method aliases (inner loop optimisation)
variable-rgx=(([a-z][a-z0-9_]*)|(((((_+|[a-z]))(([a-zA-Z0-9]*)|([a-z0-9_]*)))|(__.*__))))$
attr-rgx=[a-z_][a-z0-9_]*$
# Consts (as detected by pylint) can be:
# - functions
# - class aliases (class Bar: pass; Foo = Bar)
# - decorator functions
# - real consts
# For the moment, accept any name.
const-rgx=.*
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment