Undo enforcing of PEP-8 pylint changes for method and function names.

The full reformat will take some time, let's postpone function and
method names.

Bug: webrtc:12114
Change-Id: I2b8f19fb257af20a254c28d34cee62a1a574bcd8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/192380
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32576}
This commit is contained in:
Mirko Bonadei 2020-11-09 17:48:04 +01:00 committed by Commit Bot
parent 280054f2e6
commit 9012b09ea7

View File

@ -114,6 +114,24 @@ const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
# (CapWords) # (CapWords)
class-rgx=[A-Z_][a-zA-Z0-9]+$ 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 # Regular expression which should only match correct instance attribute names
attr-rgx=[a-z_][a-z0-9_]{2,30}$ attr-rgx=[a-z_][a-z0-9_]{2,30}$