tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

pylintrc_old_style (5864B)


      1 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
      2 #
      3 # Use of this source code is governed by a BSD-style license
      4 # that can be found in the LICENSE file in the root of the source
      5 # tree. An additional intellectual property rights grant can be found
      6 # in the file PATENTS.  All contributing project authors may
      7 # be found in the AUTHORS file in the root of the source tree.
      8 
      9 # This file is mostly based on the contents of
     10 # https://cs.chromium.org/chromium/tools/depot_tools/pylintrc
     11 # and (since the above doesn't properly support naming style checks)
     12 # https://cs.chromium.org/chromium/src/third_party/chromite/pylintrc
     13 
     14 [MESSAGES CONTROL]
     15 
     16 # Disable the message, report, category or checker with the given id(s).
     17 # TODO(kjellander): Reduce this list to as small as possible.
     18 disable=
     19   E0611,
     20   I0010,
     21   I0011,
     22   W0232,
     23   C0413,
     24   bad-continuation,
     25   broad-except,
     26   duplicate-code,
     27   eval-used,
     28   exec-used,
     29   fixme,
     30   import-error,
     31   import-outside-toplevel,
     32   missing-docstring,
     33   no-init,
     34   no-member,
     35   too-few-public-methods,
     36   too-many-ancestors,
     37   too-many-arguments,
     38   too-many-branches,
     39   too-many-function-args,
     40   too-many-instance-attributes,
     41   too-many-lines,
     42   too-many-locals,
     43   too-many-public-methods,
     44   too-many-return-statements,
     45   too-many-statements,
     46 
     47 
     48 [REPORTS]
     49 
     50 # Don't write out full reports, just messages.
     51 reports=no
     52 
     53 
     54 [VARIABLES]
     55 
     56 # Tells whether we should check for unused import in __init__ files.
     57 init-import=no
     58 
     59 # A regular expression matching the beginning of the name of dummy variables
     60 # (i.e. not used).
     61 dummy-variables-rgx=_|dummy
     62 
     63 
     64 [TYPECHECK]
     65 
     66 # Tells whether missing members accessed in mixin class should be ignored. A
     67 # mixin class is detected if its name ends with "mixin" (case insensitive).
     68 ignore-mixin-members=yes
     69 
     70 # List of classes names for which member attributes should not be checked
     71 # (useful for classes with attributes dynamically set).
     72 ignored-classes=hashlib,numpy
     73 
     74 
     75 [MISCELLANEOUS]
     76 
     77 # List of note tags to take in consideration, separated by a comma.
     78 notes=FIXME,XXX,TODO
     79 
     80 
     81 [SIMILARITIES]
     82 
     83 # Minimum lines number of a similarity.
     84 min-similarity-lines=4
     85 
     86 # Ignore comments when computing similarities.
     87 ignore-comments=yes
     88 
     89 # Ignore docstrings when computing similarities.
     90 ignore-docstrings=yes
     91 
     92 
     93 [FORMAT]
     94 
     95 # Maximum number of characters on a single line.
     96 max-line-length=80
     97 
     98 # Maximum number of lines in a module
     99 max-module-lines=1000
    100 
    101 # Use four spaces for indents.
    102 # indent-string='    '
    103 
    104 
    105 [BASIC]
    106 
    107 # List of builtins function names that should not be used, separated by a comma
    108 bad-functions=map,filter,apply,input
    109 
    110 # Regular expression which should only match correct module names
    111 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
    112 
    113 # Regular expression which should only match correct module level names
    114 # (CAPS_WITH_UNDER)
    115 const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
    116 
    117 # Regular expression which should only match correct class names
    118 # (CapWords)
    119 class-rgx=[A-Z_][a-zA-Z0-9]+$
    120 
    121 # Regular expression which should only match correct function names
    122 # The Chromium standard is different than PEP-8, so we need to redefine this to
    123 # only allow:
    124 # - CapWords
    125 # - main: Standard for main function.
    126 function-rgx=([A-Z_][a-zA-Z0-9]{2,60}|main)$
    127 
    128 # Regular expression which should only match correct method names
    129 # The Chromium standard is different than PEP-8, so we need to redefine this to
    130 # only allow:
    131 # - CapWords, starting with a capital letter.  No underscores in function
    132 #   names.  Can also have a "_" prefix (private method) or a "test" prefix
    133 #   (unit test).
    134 # - Methods that look like __xyz__, which are used to do things like
    135 #   __init__, __del__, etc.
    136 # - setUp, tearDown: For unit tests.
    137 method-rgx=((_|test)?[A-Z][a-zA-Z0-9]{2,60}|__[a-z]+__|setUp|tearDown)$
    138 
    139 # Regular expression which should only match correct instance attribute names
    140 attr-rgx=[a-z_][a-z0-9_]{2,30}$
    141 
    142 # Regular expression which should only match correct argument names
    143 argument-rgx=[a-z_][a-z0-9_]{2,30}$
    144 
    145 # Regular expression which should only match correct variable names
    146 variable-rgx=[a-z_][a-z0-9_]{0,30}$
    147 
    148 # Regular expression which should only match correct list comprehension /
    149 # generator expression variable names
    150 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
    151 
    152 # Good variable names which should always be accepted, separated by a comma
    153 good-names=i,j,k,ex,Run,_
    154 
    155 # Bad variable names which should always be refused, separated by a comma
    156 bad-names=foo,bar,baz,toto,tutu,tata
    157 
    158 # Regular expression which should only match functions or classes name which do
    159 # not require a docstring
    160 no-docstring-rgx=__.*__
    161 
    162 
    163 [DESIGN]
    164 
    165 # Maximum number of arguments for function / method
    166 max-args=5
    167 
    168 # Argument names that match this expression will be ignored. Default to name
    169 # with leading underscore
    170 ignored-argument-names=_.*
    171 
    172 # Maximum number of locals for function / method body
    173 max-locals=15
    174 
    175 # Maximum number of return / yield for function / method body
    176 max-returns=6
    177 
    178 # Maximum number of branch for function / method body
    179 max-branchs=12
    180 
    181 # Maximum number of statements in function / method body
    182 max-statements=50
    183 
    184 # Maximum number of parents for a class (see R0901).
    185 max-parents=7
    186 
    187 # Maximum number of attributes for a class (see R0902).
    188 max-attributes=7
    189 
    190 # Minimum number of public methods for a class (see R0903).
    191 min-public-methods=2
    192 
    193 # Maximum number of public methods for a class (see R0904).
    194 max-public-methods=20
    195 
    196 
    197 [CLASSES]
    198 
    199 # List of method names used to declare (i.e. assign) instance attributes.
    200 defining-attr-methods=__init__,__new__,setUp
    201 
    202 # List of valid names for the first argument in a class method.
    203 valid-classmethod-first-arg=cls
    204 
    205 
    206 [IMPORTS]
    207 
    208 # Deprecated modules which should not be used, separated by a comma
    209 deprecated-modules=regsub,TERMIOS,Bastion,rexec
    210 
    211 
    212 [EXCEPTIONS]
    213 
    214 # Exceptions that will emit a warning when being caught. Defaults to
    215 # "Exception"
    216 overgeneral-exceptions=Exception