Skip to content

Commit

Permalink
Clean up .pylintrc (cvat-ai#340)
Browse files Browse the repository at this point in the history
* Clean up the list of messages in .pylintrc

* Remove obsolete Pylint options

* .pylintrc: move the disable setting and its documentation together

* Remove the commented-out setting.
  • Loading branch information
Roman Donchenko authored Jul 8, 2021
1 parent da1ecb3 commit 369ef4a
Showing 1 changed file with 12 additions and 42 deletions.
54 changes: 12 additions & 42 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
[MASTER]

# Specify a configuration file.
#rcfile=

# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
Expand Down Expand Up @@ -34,32 +31,32 @@ unsafe-load-any-extension=no
# run arbitrary code
extension-pkg-whitelist=

# Allow optimization of some AST trees. This will activate a peephole AST
# optimizer, which will apply various small optimizations. For instance, it can
# be used to obtain the result of joining multiple strings with the addition
# operator. Joining a lot of strings can lead to a maximum recursion error in
# Pylint and this flag can prevent that. It has one side effect, the resulting
# AST will be different than the one from reality. This option is deprecated
# and it will be removed in Pylint 2.0.
optimize-ast=no


[MESSAGES CONTROL]

# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
confidence=

# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once).You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=all

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
disable=all
enable=
C0123, # unidiomatic-typecheck
C0200, # consider-using-enumerate
C0303, # trailing-whitespace
C1001, # old-style-class

E0001, # syntax-error
E0100, # init-is-generator
Expand All @@ -68,7 +65,6 @@ enable=
E0103, # not-in-loop
E0104, # return-outside-function
E0105, # yield-outside-function
E0106, # return-arg-in-generator
E0107, # nonexistent-operator
E0108, # duplicate-argument-name
E0110, # abstract-class-instantiated
Expand Down Expand Up @@ -121,9 +117,9 @@ enable=
E1305, # too-many-format-args
E1306, # too-few-format-args

R0102, # simplifiable-if-statement
R0202, # no-classmethod-decorator
R0203, # no-staticmethod-decorator
R1703, # simplifiable-if-statement

W0101, # unreachable
W0102, # dangerous-default-value
Expand All @@ -133,7 +129,6 @@ enable=
W0107, # unnecessary-pass
W0108, # unnecessary-lambda
W0109, # duplicate-key
W0110, # deprecated-lambda
W0120, # useless-else-on-loop
W0122, # exec-used
W0124, # confusing-with-statement
Expand All @@ -150,7 +145,6 @@ enable=
W0611, # unused-import
W0612, # unused-variable
W0622, # redefined-builtin
W0623, # redefine-in-handler
W0702, # bare-except
W0705, # duplicate-except
W0711, # binary-op-exception
Expand All @@ -163,31 +157,13 @@ enable=
W1307, # invalid-format-index


# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once).You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
#disable=old-octal-literal,basestring-builtin,no-absolute-import,old-division,coerce-method,long-suffix,reload-builtin,unichr-builtin,indexing-exception,raising-string,dict-iter-method,metaclass-assignment,filter-builtin-not-iterating,import-star-module-level,next-method-called,cmp-method,raw_input-builtin,old-raise-syntax,cmp-builtin,apply-builtin,getslice-method,input-builtin,backtick,coerce-builtin,range-builtin-not-iterating,xrange-builtin,using-cmp-argument,buffer-builtin,hex-method,execfile-builtin,unpacking-in-except,standarderror-builtin,round-builtin,nonzero-method,unicode-builtin,reduce-builtin,file-builtin,dict-view-method,old-ne-operator,print-statement,suppressed-message,oct-method,useless-suppression,delslice-method,long-builtin,setslice-method,zip-builtin-not-iterating,map-builtin-not-iterating,intern-builtin,parameter-unpacking


[REPORTS]

# Set the output format. Available formats are text, parseable, colorized, msvs
# (visual studio) and html. You can also give a reporter class, eg
# mypackage.mymodule.MyReporterClass.
output-format=text

# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
# written in a file name "pylint_global.[txt|html]". This option is deprecated
# and it will be removed in Pylint 2.0.
files-output=no

# Tells whether to display a full report or only the messages
reports=yes

Expand Down Expand Up @@ -311,12 +287,6 @@ ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# else.
single-line-if-stmt=no

# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,dict-separator

# Maximum number of lines in a module
max-module-lines=1000

Expand Down

0 comments on commit 369ef4a

Please sign in to comment.