Skip to content

Commit 9012b09

Browse files
MirkoBonadeiCommit Bot
authored and
Commit Bot
committed
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 <[email protected]> Commit-Queue: Mirko Bonadei <[email protected]> Cr-Commit-Position: refs/heads/master@{#32576}
1 parent 280054f commit 9012b09

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

pylintrc

+18
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,24 @@ const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
114114
# (CapWords)
115115
class-rgx=[A-Z_][a-zA-Z0-9]+$
116116

117+
# Regular expression which should only match correct function names
118+
# The Chromium standard is different than PEP-8, so we need to redefine this to
119+
# only allow:
120+
# - CapWords
121+
# - main: Standard for main function.
122+
function-rgx=([A-Z_][a-zA-Z0-9]{2,60}|main)$
123+
124+
# Regular expression which should only match correct method names
125+
# The Chromium standard is different than PEP-8, so we need to redefine this to
126+
# only allow:
127+
# - CapWords, starting with a capital letter. No underscores in function
128+
# names. Can also have a "_" prefix (private method) or a "test" prefix
129+
# (unit test).
130+
# - Methods that look like __xyz__, which are used to do things like
131+
# __init__, __del__, etc.
132+
# - setUp, tearDown: For unit tests.
133+
method-rgx=((_|test)?[A-Z][a-zA-Z0-9]{2,60}|__[a-z]+__|setUp|tearDown)$
134+
117135
# Regular expression which should only match correct instance attribute names
118136
attr-rgx=[a-z_][a-z0-9_]{2,30}$
119137

0 commit comments

Comments
 (0)