mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Configure Pylint to follow PEP-8
This is a follow-up on [1] to make presubmit succeed on PEP-8 compliant code. [1] https://webrtc-review.googlesource.com/c/src/+/321122 Bug: None Change-Id: Ie4261cf6c15f22c152a7d5793d7b1f7a71109f33 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321081 Reviewed-by: Jeremy Leconte <jleconte@webrtc.org> Commit-Queue: Emil Lundmark <lndmrk@webrtc.org> Cr-Commit-Position: refs/heads/main@{#40803}
This commit is contained in:
parent
7d1aff6eed
commit
7892f05411
1 changed files with 19 additions and 33 deletions
52
pylintrc
52
pylintrc
|
@ -93,13 +93,13 @@ ignore-docstrings=yes
|
||||||
[FORMAT]
|
[FORMAT]
|
||||||
|
|
||||||
# Maximum number of characters on a single line.
|
# Maximum number of characters on a single line.
|
||||||
max-line-length=80
|
max-line-length=79
|
||||||
|
|
||||||
# Maximum number of lines in a module
|
# Maximum number of lines in a module
|
||||||
max-module-lines=1000
|
max-module-lines=1000
|
||||||
|
|
||||||
# We use two spaces for indents, instead of the usual four spaces or tab.
|
# Use four spaces for indents.
|
||||||
indent-string=' '
|
indent-string=' '
|
||||||
|
|
||||||
|
|
||||||
[BASIC]
|
[BASIC]
|
||||||
|
@ -107,43 +107,29 @@ indent-string=' '
|
||||||
# List of builtins function names that should not be used, separated by a comma
|
# List of builtins function names that should not be used, separated by a comma
|
||||||
bad-functions=map,filter,apply,input
|
bad-functions=map,filter,apply,input
|
||||||
|
|
||||||
# Regular expression which should only match correct module names
|
# Naming style matching correct module names.
|
||||||
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
|
module-naming-style=snake_case
|
||||||
|
|
||||||
# Regular expression which should only match correct module level names
|
# Naming style matching correct constant names.
|
||||||
# (CAPS_WITH_UNDER)
|
const-naming-style=UPPER_CASE
|
||||||
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct class names
|
# Naming style matching correct class names.
|
||||||
# (CapWords)
|
class-naming-style=PascalCase
|
||||||
class-rgx=[A-Z_][a-zA-Z0-9]+$
|
|
||||||
|
|
||||||
# Regular expression which should only match correct function names
|
# Naming style matching correct function names.
|
||||||
# The Chromium standard is different than PEP-8, so we need to redefine this to
|
function-naming-style=snake_case
|
||||||
# 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
|
# Regular expression matching correct method names.
|
||||||
# The Chromium standard is different than PEP-8, so we need to redefine this to
|
method-rgx=([a-z_][a-z0-9_]{2,}|setUp|tearDown)$
|
||||||
# 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
|
# Naming style matching correct attribute names.
|
||||||
attr-rgx=[a-z_][a-z0-9_]{2,30}$
|
attr-naming-style=snake_case
|
||||||
|
|
||||||
# Regular expression which should only match correct argument names
|
# Naming style matching correct argument names.
|
||||||
argument-rgx=[a-z_][a-z0-9_]{2,30}$
|
argument-naming-style=snake_case
|
||||||
|
|
||||||
# Regular expression which should only match correct variable names
|
# Naming style matching correct variable names.
|
||||||
variable-rgx=[a-z_][a-z0-9_]{0,30}$
|
variable-naming-style=snake_case
|
||||||
|
|
||||||
# Regular expression which should only match correct list comprehension /
|
# Regular expression which should only match correct list comprehension /
|
||||||
# generator expression variable names
|
# generator expression variable names
|
||||||
|
|
Loading…
Reference in a new issue