mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 13:20:44 +01:00

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}
202 lines
4.9 KiB
INI
202 lines
4.9 KiB
INI
# Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
|
|
#
|
|
# Use of this source code is governed by a BSD-style license
|
|
# that can be found in the LICENSE file in the root of the source
|
|
# tree. An additional intellectual property rights grant can be found
|
|
# in the file PATENTS. All contributing project authors may
|
|
# be found in the AUTHORS file in the root of the source tree.
|
|
|
|
# This file is mostly based on the contents of
|
|
# https://cs.chromium.org/chromium/tools/depot_tools/pylintrc
|
|
# and (since the above doesn't properly support naming style checks)
|
|
# https://cs.chromium.org/chromium/src/third_party/chromite/pylintrc
|
|
|
|
[MESSAGES CONTROL]
|
|
|
|
# Disable the message, report, category or checker with the given id(s).
|
|
# TODO(kjellander): Reduce this list to as small as possible.
|
|
disable=
|
|
E0611,
|
|
I0010,
|
|
I0011,
|
|
W0232,
|
|
C0413,
|
|
bad-continuation,
|
|
broad-except,
|
|
duplicate-code,
|
|
eval-used,
|
|
exec-used,
|
|
fixme,
|
|
import-error,
|
|
import-outside-toplevel,
|
|
missing-docstring,
|
|
no-init,
|
|
no-member,
|
|
too-few-public-methods,
|
|
too-many-ancestors,
|
|
too-many-arguments,
|
|
too-many-branches,
|
|
too-many-function-args,
|
|
too-many-instance-attributes,
|
|
too-many-lines,
|
|
too-many-locals,
|
|
too-many-public-methods,
|
|
too-many-return-statements,
|
|
too-many-statements,
|
|
|
|
|
|
[REPORTS]
|
|
|
|
# Don't write out full reports, just messages.
|
|
reports=no
|
|
|
|
|
|
[VARIABLES]
|
|
|
|
# Tells whether we should check for unused import in __init__ files.
|
|
init-import=no
|
|
|
|
# A regular expression matching the beginning of the name of dummy variables
|
|
# (i.e. not used).
|
|
dummy-variables-rgx=_|dummy
|
|
|
|
|
|
[TYPECHECK]
|
|
|
|
# Tells whether missing members accessed in mixin class should be ignored. A
|
|
# mixin class is detected if its name ends with "mixin" (case insensitive).
|
|
ignore-mixin-members=yes
|
|
|
|
# List of classes names for which member attributes should not be checked
|
|
# (useful for classes with attributes dynamically set).
|
|
ignored-classes=hashlib,numpy
|
|
|
|
|
|
[MISCELLANEOUS]
|
|
|
|
# List of note tags to take in consideration, separated by a comma.
|
|
notes=FIXME,XXX,TODO
|
|
|
|
|
|
[SIMILARITIES]
|
|
|
|
# Minimum lines number of a similarity.
|
|
min-similarity-lines=4
|
|
|
|
# Ignore comments when computing similarities.
|
|
ignore-comments=yes
|
|
|
|
# Ignore docstrings when computing similarities.
|
|
ignore-docstrings=yes
|
|
|
|
|
|
[FORMAT]
|
|
|
|
# Maximum number of characters on a single line.
|
|
max-line-length=79
|
|
|
|
# Maximum number of lines in a module
|
|
max-module-lines=1000
|
|
|
|
# Use four spaces for indents.
|
|
indent-string=' '
|
|
|
|
|
|
[BASIC]
|
|
|
|
# List of builtins function names that should not be used, separated by a comma
|
|
bad-functions=map,filter,apply,input
|
|
|
|
# Naming style matching correct module names.
|
|
module-naming-style=snake_case
|
|
|
|
# Naming style matching correct constant names.
|
|
const-naming-style=UPPER_CASE
|
|
|
|
# Naming style matching correct class names.
|
|
class-naming-style=PascalCase
|
|
|
|
# Naming style matching correct function names.
|
|
function-naming-style=snake_case
|
|
|
|
# Regular expression matching correct method names.
|
|
method-rgx=([a-z_][a-z0-9_]{2,}|setUp|tearDown)$
|
|
|
|
# Naming style matching correct attribute names.
|
|
attr-naming-style=snake_case
|
|
|
|
# Naming style matching correct argument names.
|
|
argument-naming-style=snake_case
|
|
|
|
# Naming style matching correct variable names.
|
|
variable-naming-style=snake_case
|
|
|
|
# Regular expression which should only match correct list comprehension /
|
|
# generator expression variable names
|
|
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
|
|
|
|
# Good variable names which should always be accepted, separated by a comma
|
|
good-names=i,j,k,ex,Run,_
|
|
|
|
# Bad variable names which should always be refused, separated by a comma
|
|
bad-names=foo,bar,baz,toto,tutu,tata
|
|
|
|
# Regular expression which should only match functions or classes name which do
|
|
# not require a docstring
|
|
no-docstring-rgx=__.*__
|
|
|
|
|
|
[DESIGN]
|
|
|
|
# Maximum number of arguments for function / method
|
|
max-args=5
|
|
|
|
# Argument names that match this expression will be ignored. Default to name
|
|
# with leading underscore
|
|
ignored-argument-names=_.*
|
|
|
|
# Maximum number of locals for function / method body
|
|
max-locals=15
|
|
|
|
# Maximum number of return / yield for function / method body
|
|
max-returns=6
|
|
|
|
# Maximum number of branch for function / method body
|
|
max-branchs=12
|
|
|
|
# Maximum number of statements in function / method body
|
|
max-statements=50
|
|
|
|
# Maximum number of parents for a class (see R0901).
|
|
max-parents=7
|
|
|
|
# Maximum number of attributes for a class (see R0902).
|
|
max-attributes=7
|
|
|
|
# Minimum number of public methods for a class (see R0903).
|
|
min-public-methods=2
|
|
|
|
# Maximum number of public methods for a class (see R0904).
|
|
max-public-methods=20
|
|
|
|
|
|
[CLASSES]
|
|
|
|
# List of method names used to declare (i.e. assign) instance attributes.
|
|
defining-attr-methods=__init__,__new__,setUp
|
|
|
|
# List of valid names for the first argument in a class method.
|
|
valid-classmethod-first-arg=cls
|
|
|
|
|
|
[IMPORTS]
|
|
|
|
# Deprecated modules which should not be used, separated by a comma
|
|
deprecated-modules=regsub,TERMIOS,Bastion,rexec
|
|
|
|
|
|
[EXCEPTIONS]
|
|
|
|
# Exceptions that will emit a warning when being caught. Defaults to
|
|
# "Exception"
|
|
overgeneral-exceptions=Exception
|