55# only in one or another interpreter, leading to false positives when analysed.
66analyse-fallback-blocks =no
77
8+ # Clear in-memory caches upon conclusion of linting. Useful if running pylint
9+ # in a server-like mode.
10+ clear-cache-post-run =no
11+
12+ # Files or directories matching the regular expression patterns are skipped.
13+ # The regex matches against base names, not paths. The default value ignores
14+ # Emacs file locks
15+ # ignore-patterns=^\.#
16+ ignore-patterns =
17+
818# Load and enable all available extensions. Use --list-extensions to see a list
919# all available extensions.
10- # enable-all-extensions=
20+ # enable-all-extensions=pylint.extensions.empty_comment,pylint.extensions.dunder,pylint.extensions.code_style,pylint.extensions.eq_without_hash,pylint.extensions.broad_try_clause,pylint.extensions.consider_refactoring_into_while_condition,pylint.extensions.docparams,pylint.extensions.mccabe,pylint.extensions.dict_init_mutate,pylint.extensions.emptystring,pylint.extensions.comparetozero,pylint.extensions.confusing_elif,pylint.extensions.for_any_all,pylint.extensions.redefined_loop_name,pylint.extensions.consider_ternary_expression,pylint.extensions.while_used,pylint.extensions.magic_value,pylint.extensions.typing,pylint.extensions.redefined_variable_type,pylint.extensions.comparison_placement,pylint.extensions.docstyle,pylint.extensions.check_elif,pylint.extensions.no_self_use,pylint.extensions.private_import,pylint.extensions.set_membership,pylint.extensions.overlapping_exceptions,pylint.extensions.bad_builtin
1121
12- # Files or directories matching the regex patterns are skipped. The regex
13- # matches against base names, not paths. The default value ignores Emacs file
14- # locks
15- ignore-patterns =
1622
17- # In error mode, checkers without error messages are disabled and for others,
18- # only the ERROR messages are displayed, and no reports are done by default.
23+ # In error mode, messages with a category besides ERROR or FATAL are
24+ # suppressed, and no reports are done by default. Error mode is compatible with
25+ # disabling specific errors.
1926# errors-only=
2027
2128# Always return a 0 (non-error) status code, even if lint errors are found.
@@ -24,26 +31,29 @@ ignore-patterns=
2431
2532# A comma-separated list of package or module names from where C extensions may
2633# be loaded. Extensions are loading into the active Python interpreter and may
27- # run arbitrary code.
28- extension-pkg-allow-list =pydantic
34+ # run arbitrary code. (This is an alternative name to extension-pkg-allow-list
35+ # for backward compatibility.)
36+ extension-pkg-whitelist =pydantic
2937
3038# Return non-zero exit code if any of these messages/categories are detected,
3139# even if score is above --fail-under value. Syntax same as enable. Messages
3240# specified are enabled, while categories only check already-enabled messages.
3341fail-on =
3442
35- # Specify a score threshold to be exceeded before program exits with error.
43+ # Specify a score threshold under which the program will exit with error.
3644fail-under =10
3745
3846# Interpret the stdin as a python script, whose filename needs to be passed as
3947# the module_or_package argument.
4048# from-stdin=
4149
4250# Files or directories to be skipped. They should be base names, not paths.
43- ignore =CVS,.venv,.build,cdk.out
51+ ignore =CVS,.venv,.build
4452
45- # Add files or directories matching the regex patterns to the ignore-list. The
46- # regex matches against paths and can be in Posix or Windows format.
53+ # Add files or directories matching the regular expressions patterns to the
54+ # ignore-list. The regex matches against paths and can be in Posix or Windows
55+ # format. Because '\\' represents the directory delimiter on Windows systems,
56+ # it can't be used as an escape character.
4757ignore-paths =
4858
4959# List of module names for which member attributes should not be checked
@@ -54,11 +64,33 @@ ignored-modules=
5464
5565# Python code to execute, usually for sys.path manipulation such as
5666# pygtk.require().
57- init-hook =" from pathlib import Path; import os, sys, git; root_dir = Path(git.Repo(os.getcwd(), search_parent_directories=True).working_tree_dir); sys.path.append(root_dir)"
67+ init-hook =" from pathlib import Path; import os, sys; root_dir = Path(os.getcwd()); sys.path.insert(0,str(root_dir));"
68+ # To troubleshoot import issue with pylint, add this to the end of init-hook: ";print(os.getcwd()); print(sys.path)"
5869
5970# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
60- # number of processors available to use.
61- jobs =2
71+ # number of processors available to use, and will cap the count on Windows to
72+ # avoid hangs.
73+ jobs =4
74+
75+ # Discover python modules and packages in the file system subtree.
76+ recursive =yes
77+
78+ # Add paths to the list of the source roots. Supports globbing patterns. The
79+ # source root is an absolute path or a path relative to the current working
80+ # directory used to determine a package namespace for modules located under the
81+ # source root.
82+ source-roots =
83+
84+ # When enabled, pylint would attempt to guess common misconfiguration and emit
85+ # user-friendly hints instead of false-positive error messages.
86+ suggestion-mode =yes
87+
88+ # Allow loading of arbitrary C extensions. Extensions are imported into the
89+ # active Python interpreter and may run arbitrary code.
90+ unsafe-load-any-extension =no
91+
92+ # In verbose mode, extra non-checker-related info will be displayed.
93+ # verbose=
6294
6395# Control the amount of potential inferred values when inferring a single
6496# object. This can help the performance when dealing with large functions or
@@ -67,7 +99,7 @@ limit-inference-results=100
6799
68100# List of plugins (as comma separated values of python module names) to load,
69101# usually to register additional checkers.
70- load-plugins =pylint.extensions.no_self_use
102+ load-plugins =
71103
72104# Pickle collected data for later comparisons.
73105persistent =yes
@@ -76,20 +108,6 @@ persistent=yes
76108# the version used to run pylint.
77109py-version =3.8
78110
79- # Discover python modules and packages in the file system subtree.
80- recursive =yes
81-
82- # When enabled, pylint would attempt to guess common misconfiguration and emit
83- # user-friendly hints instead of false-positive error messages.
84- suggestion-mode =yes
85-
86- # Allow loading of arbitrary C extensions. Extensions are imported into the
87- # active Python interpreter and may run arbitrary code.
88- unsafe-load-any-extension =no
89-
90- # In verbose mode, extra non-checker-related info will be displayed.
91- # verbose=
92-
93111
94112[MESSAGES CONTROL]
95113
@@ -107,35 +125,26 @@ confidence=
107125# --enable=similarities". If you want to run only the classes checker, but have
108126# no Warning level messages displayed, use "--disable=all --enable=classes
109127# --disable=W".
110- disable =file-ignored,
111- wrong-import-position,
112- global-statement,
113- too-few-public-methods,
114- locally-disabled,
115- c-extension-no-member,
116- suppressed-message,
117- cell-var-from-loop,
118- use-symbolic-message-instead,
119- missing-class-docstring,
120- missing-function-docstring,
121- missing-module-docstring,
122- redefined-outer-name,
123- bad-inline-option,
124- useless-suppression,
125- raw-checker-failed,
126- duplicate-code,
127- wrong-import-order,
128- deprecated-pragma,
129- fixme,
130- logging-fstring-interpolation,
131- missing-timeout
128+ disable =c-extension-no-member, # https://pylint.readthedocs.io/en/latest/user_guide/messages/information/c-extension-no-member.html
129+ wrong-import-position, # https://pylint.readthedocs.io/en/latest/user_guide/messages/convention/wrong-import-position.html
130+ wrong-import-order, # https://pylint.readthedocs.io/en/latest/user_guide/messages/convention/wrong-import-order.html
131+ global-statement, # https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/global-statement.html
132+ too-few-public-methods, # https://pylint.readthedocs.io/en/latest/user_guide/messages/refactor/too-few-public-methods.html
133+ missing-class-docstring, # https://pylint.readthedocs.io/en/latest/user_guide/messages/convention/missing-class-docstring.html
134+ missing-function-docstring, # https://pylint.readthedocs.io/en/latest/user_guide/messages/convention/missing-function-docstring.html
135+ missing-module-docstring, # https://pylint.readthedocs.io/en/latest/user_guide/messages/convention/missing-module-docstring.html
136+ redefined-outer-name, # https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/redefined-outer-name.html
137+ fixme, # https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/fixme.html
138+ broad-exception-caught, # https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/broad-exception-caught.html
139+ broad-exception-raised, # https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/broad-exception-raised.html
140+ duplicate-code, # https://pylint.readthedocs.io/en/latest/user_guide/messages/refactor/duplicate-code.html
141+ logging-fstring-interpolation
132142
133143# Enable the message, report, category or checker with the given id(s). You can
134144# either give multiple identifier separated by comma (,) or put this option
135145# multiple time (only on the command line, not in the configuration file where
136146# it should appear only once). See also the "--disable" option for examples.
137- enable =
138-
147+ enable =c-extension-no-member
139148
140149[REPORTS]
141150
@@ -148,10 +157,11 @@ evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor
148157
149158# Template used to display messages. This is a python new-style format string
150159# used to format the message information. See doc for all details.
151- # msg-template=
160+ msg-template =
152161
153- # Set the output format. Available formats are text, parseable, colorized, json
154- # and msvs (visual studio). You can also give a reporter class, e.g.
162+ # Set the output format. Available formats are: text, parseable, colorized,
163+ # json2 (improved json format), json (old json format) and msvs (visual
164+ # studio). You can also give a reporter class, e.g.
155165# mypackage.mymodule.MyReporterClass.
156166output-format =text
157167
@@ -173,7 +183,6 @@ max-nested-blocks=5
173183# printed.
174184never-returning-functions =sys.exit,argparse.parse_error
175185
176-
177186[BASIC]
178187
179188# Naming style matching correct argument names.
@@ -297,6 +306,10 @@ no-docstring-rgx=^_
297306# These decorators are taken in consideration only for invalid-name.
298307property-classes =abc.abstractproperty
299308
309+ # Regular expression matching correct type alias names. If left empty, type
310+ # alias names will be checked with the set naming style.
311+ # typealias-rgx=
312+
300313# Regular expression matching correct type variable names. If left empty, type
301314# variable names will be checked with the set naming style.
302315# typevar-rgx=
@@ -309,7 +322,6 @@ variable-naming-style=snake_case
309322# naming style.
310323# variable-rgx=
311324
312-
313325[FORMAT]
314326
315327# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
@@ -351,11 +363,19 @@ logging-format-style=new
351363logging-modules =logging
352364
353365
366+ [METHOD_ARGS]
367+
368+ # List of qualified names (i.e., library.method) which require a timeout
369+ # parameter e.g. 'requests.api.get,requests.api.post'
370+ timeout-methods =requests.api.delete,requests.api.get,requests.api.head,requests.api.options,requests.api.patch,requests.api.post,requests.api.put,requests.api.request
371+
372+
354373[MISCELLANEOUS]
355374
356375# List of note tags to take in consideration, separated by a comma.
357- notes =FIXME,XXX,TODO
358-
376+ notes =FIXME,
377+ XXX,
378+ TODO
359379
360380# Regular expression of note tags to take in consideration.
361381notes-rgx =
@@ -384,8 +404,8 @@ min-similarity-lines=4
384404# Limits count of emitted suggestions for spelling mistakes.
385405max-spelling-suggestions =4
386406
387- # Spelling dictionary name. Available dictionaries: none. To make it work,
388- # install the python-enchant package.
407+ # Spelling dictionary name. No available dictionaries : You need to install
408+ # both the python package and the system dependency for enchant to work .
389409spelling-dict =
390410
391411# List of comma separated words that should be considered directives if they
@@ -424,7 +444,7 @@ contextmanager-decorators=contextlib.contextmanager
424444# List of members which are set dynamically and missed by pylint inference
425445# system, and so shouldn't trigger E1101 when accessed. Python regular
426446# expressions are accepted.
427- generated-members =boto3.*
447+ generated-members =
428448
429449# Tells whether to warn about missing members when the owner of the attribute
430450# is inferred to be None.
@@ -489,8 +509,7 @@ callbacks=cb_,
489509# not be used).
490510dummy-variables-rgx =_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
491511
492- # Argument names that match this expression will be ignored. Default to name
493- # with leading underscore.
512+ # Argument names that match this expression will be ignored.
494513ignored-argument-names =_.*|^ignored_|^unused_
495514
496515# Tells whether we should check for unused import in __init__ files.
@@ -510,15 +529,12 @@ check-protected-access-in-special-methods=no
510529defining-attr-methods =__init__,
511530 __new__,
512531 setUp,
532+ asyncSetUp,
513533 __post_init__
514534
515535# List of member names, which should be excluded from the protected access
516536# warning.
517- exclude-protected =_asdict,
518- _fields,
519- _replace,
520- _source,
521- _make
537+ exclude-protected =_asdict,_fields,_replace,_source,_make,os._exit
522538
523539# List of valid names for the first argument in a class method.
524540valid-classmethod-first-arg =cls
@@ -538,7 +554,7 @@ exclude-too-few-public-methods=
538554ignored-parents =
539555
540556# Maximum number of arguments for function / method.
541- max-args =5
557+ max-args =10
542558
543559# Maximum number of attributes for a class (see R0902).
544560max-attributes =7
@@ -567,13 +583,15 @@ max-statements=50
567583# Minimum number of public methods for a class (see R0903).
568584min-public-methods =2
569585
570-
571586[IMPORTS]
572587
573588# List of modules that can be imported at any level, not just the top level
574589# one.
575590allow-any-import-level =
576591
592+ # Allow explicit reexports by alias from a package __init__.
593+ allow-reexport-from-package =no
594+
577595# Allow wildcard imports from modules that define __all__.
578596allow-wildcard-with-all =no
579597
@@ -607,4 +625,4 @@ preferred-modules=
607625[EXCEPTIONS]
608626
609627# Exceptions that will emit a warning when caught.
610- overgeneral-exceptions =builtins.BaseException
628+ overgeneral-exceptions =builtins.BaseException,builtins.Exception
0 commit comments