diff --git a/pylintrc b/pylintrc index d8e7b0293e..f26c84adce 100644 --- a/pylintrc +++ b/pylintrc @@ -114,6 +114,24 @@ const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ # (CapWords) class-rgx=[A-Z_][a-zA-Z0-9]+$ +# Regular expression which should only match correct function names +# The Chromium standard is different than PEP-8, so we need to redefine this to +# only allow: +# - CapWords +# - main: Standard for main function. +function-rgx=([A-Z_][a-zA-Z0-9]{2,60}|main)$ + +# Regular expression which should only match correct method names +# The Chromium standard is different than PEP-8, so we need to redefine this to +# only allow: +# - CapWords, starting with a capital letter. No underscores in function +# names. Can also have a "_" prefix (private method) or a "test" prefix +# (unit test). +# - Methods that look like __xyz__, which are used to do things like +# __init__, __del__, etc. +# - setUp, tearDown: For unit tests. +method-rgx=((_|test)?[A-Z][a-zA-Z0-9]{2,60}|__[a-z]+__|setUp|tearDown)$ + # Regular expression which should only match correct instance attribute names attr-rgx=[a-z_][a-z0-9_]{2,30}$