|
| 1 | +# Pylint section |
| 2 | + |
| 3 | +# Minimal pylint configuration file for Secure Systems Lab Python Style Guide: |
| 4 | +# https://github.com/secure-systems-lab/code-style-guidelines |
| 5 | +# |
| 6 | +# Based on Google Python Style Guide pylintrc and pylint defaults: |
| 7 | +# https://google.github.io/styleguide/pylintrc |
| 8 | +# http://pylint.pycqa.org/en/latest/technical_reference/features.html |
| 9 | +[MASTER] |
| 10 | +ignore = _vendor |
| 11 | + |
| 12 | +[message_control] |
| 13 | +# Disable the message, report, category or checker with the given id(s). |
| 14 | +# NOTE: To keep this config as short as possible we only disable checks that |
| 15 | +# are currently in conflict with our code. If new code displeases the linter |
| 16 | +# (for good reasons) consider updating this config file, or disable checks with. |
| 17 | +disable = |
| 18 | + fixme, |
| 19 | + too-few-public-methods, |
| 20 | + too-many-arguments, |
| 21 | + format, |
| 22 | + duplicate-code |
| 23 | + |
| 24 | +[basic] |
| 25 | +good-names = i,j,k,v,e,f,fn,fp,_type,_ |
| 26 | +# Regexes for allowed names are copied from the Google pylintrc |
| 27 | +# NOTE: Pylint captures regex name groups such as 'snake_case' or 'camel_case'. |
| 28 | +# If there are multiple groups it enfoces the prevalent naming style inside |
| 29 | +# each modules. Names in the exempt capturing group are ignored. |
| 30 | +function-rgx = ^(?:(?P<exempt>setUp|tearDown|setUpModule|tearDownModule)|(?P<camel_case>_?[A-Z][a-zA-Z0-9]*)|(?P<snake_case>_?[a-z][a-z0-9_]*))$ |
| 31 | +method-rgx = (?x)^(?:(?P<exempt>_[a-z0-9_]+__|runTest|setUp|tearDown|setUpTestCase|tearDownTestCase|setupSelf|tearDownClass|setUpClass|(test|assert)_*[A-Z0-9][a-zA-Z0-9_]*|next)|(?P<camel_case>_{0,2}[A-Z][a-zA-Z0-9_]*)|(?P<snake_case>_{0,2}[a-z][a-z0-9_]*))$ |
| 32 | +argument-rgx = ^[a-z][a-z0-9_]*$ |
| 33 | +attr-rgx = ^_{0,2}[a-z][a-z0-9_]*$ |
| 34 | +class-attribute-rgx = ^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$ |
| 35 | +class-rgx = ^_?[A-Z][a-zA-Z0-9]*$ |
| 36 | +const-rgx = ^(_?[A-Z][A-Z0-9_]*|__[a-z0-9_]+__|_?[a-z][a-z0-9_]*)$ |
| 37 | +inlinevar-rgx = ^[a-z][a-z0-9_]*$ |
| 38 | +module-rgx = ^(_?[a-z][a-z0-9_]*|__init__)$ |
| 39 | +no-docstring-rgx = (__.*__|main|test.*|.*test|.*Test)$ |
| 40 | +variable-rgx = ^[a-z][a-z0-9_]*$ |
| 41 | +docstring-min-length = 10 |
| 42 | + |
| 43 | +[logging] |
| 44 | +logging-format-style=old |
| 45 | + |
| 46 | +[miscellaneous] |
| 47 | +notes=TODO |
| 48 | + |
| 49 | +[STRING] |
| 50 | +check-quote-consistency=yes |
0 commit comments