@@ -31,7 +31,7 @@ extension-pkg-allow-list=
3131# be loaded. Extensions are loading into the active Python interpreter and may
3232# run arbitrary code. (This is an alternative name to extension-pkg-allow-list
3333# for backward compatibility.)
34- extension-pkg-whitelist =cv2
34+ extension-pkg-whitelist =
3535
3636# Return non-zero exit code if any of these messages/categories are detected,
3737# even if score is above --fail-under value. Syntax same as enable. Messages
@@ -59,15 +59,16 @@ ignore-paths=
5959# Emacs file locks
6060ignore-patterns =^\.#
6161
62- # List of module names for which member attributes should not be checked
63- # (useful for modules/projects where namespaces are manipulated during runtime
64- # and thus existing member attributes cannot be deduced by static analysis). It
65- # supports qualified module names, as well as Unix pattern matching.
66- ignored-modules =cv2
62+ # List of module names for which member attributes should not be checked and
63+ # will not be imported (useful for modules/projects where namespaces are
64+ # manipulated during runtime and thus existing member attributes cannot be
65+ # deduced by static analysis). It supports qualified module names, as well as
66+ # Unix pattern matching.
67+ ignored-modules =
6768
6869# Python code to execute, usually for sys.path manipulation such as
6970# pygtk.require().
70- init-hook =' import sys; sys.path.append(".") '
71+ # init-hook=
7172
7273# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
7374# number of processors available to use, and will cap the count on Windows to
@@ -86,9 +87,13 @@ load-plugins=
8687# Pickle collected data for later comparisons.
8788persistent =yes
8889
90+ # Resolve imports to .pyi stubs if available. May reduce no-member messages and
91+ # increase not-an-iterable messages.
92+ prefer-stubs =no
93+
8994# Minimum Python version to use for version dependent checks. Will default to
9095# the version used to run pylint.
91- py-version =3.10
96+ py-version =3.12
9297
9398# Discover python modules and packages in the file system subtree.
9499recursive =no
@@ -99,10 +104,6 @@ recursive=no
99104# source root.
100105source-roots =
101106
102- # When enabled, pylint would attempt to guess common misconfiguration and emit
103- # user-friendly hints instead of false-positive error messages.
104- suggestion-mode =yes
105-
106107# Allow loading of arbitrary C extensions. Extensions are imported into the
107108# active Python interpreter and may run arbitrary code.
108109unsafe-load-any-extension =no
@@ -229,6 +230,11 @@ name-group=
229230# not require a docstring.
230231no-docstring-rgx =^_
231232
233+ # Regular expression matching correct parameter specification variable names.
234+ # If left empty, parameter specification variable names will be checked with
235+ # the set naming style.
236+ # paramspec-rgx=
237+
232238# List of decorators that produce properties, such as abc.abstractproperty. Add
233239# to this list to register other decorators that produce valid properties.
234240# These decorators are taken in consideration only for invalid-name.
@@ -242,13 +248,17 @@ property-classes=abc.abstractproperty
242248# variable names will be checked with the set naming style.
243249# typevar-rgx=
244250
251+ # Regular expression matching correct type variable tuple names. If left empty,
252+ # type variable tuple names will be checked with the set naming style.
253+ # typevartuple-rgx=
254+
245255# Naming style matching correct variable names.
246256variable-naming-style =snake_case
247257
248258# Regular expression matching correct variable names. Overrides variable-
249259# naming-style. If left empty, variable names will be checked with the set
250260# naming style.
251- variable-rgx =(_?[a-z][A-Za-z0-9]{0,30})|([A-Z0-9]{1,30})
261+ # variable-rgx=
252262
253263
254264[CLASSES]
@@ -285,10 +295,10 @@ exclude-too-few-public-methods=
285295ignored-parents =
286296
287297# Maximum number of arguments for function / method.
288- max-args =7
298+ max-args =5
289299
290300# Maximum number of attributes for a class (see R0902).
291- max-attributes =20
301+ max-attributes =7
292302
293303# Maximum number of boolean expressions in an if statement (see R0916).
294304max-bool-expr =5
@@ -302,17 +312,20 @@ max-locals=15
302312# Maximum number of parents for a class (see R0901).
303313max-parents =7
304314
315+ # Maximum number of positional arguments for function / method.
316+ max-positional-arguments =5
317+
305318# Maximum number of public methods for a class (see R0904).
306319max-public-methods =20
307320
308321# Maximum number of return / yield for function / method body.
309322max-returns =6
310323
311324# Maximum number of statements in function / method body.
312- max-statements =300
325+ max-statements =50
313326
314327# Minimum number of public methods for a class (see R0903).
315- min-public-methods =1
328+ min-public-methods =2
316329
317330
318331[EXCEPTIONS]
@@ -336,11 +349,13 @@ indent-after-paren=4
336349# tab).
337350indent-string =' '
338351
339- # Maximum number of characters on a single line.
340- max-line-length =150
352+ # Maximum number of characters on a single line. Pylint's default of 100 is
353+ # based on PEP 8's guidance that teams may choose line lengths up to 99
354+ # characters.
355+ max-line-length =100
341356
342357# Maximum number of lines in a module.
343- max-module-lines =2000
358+ max-module-lines =1000
344359
345360# Allow the body of a class to be on the same line as the declaration if body
346361# contains single statement.
@@ -421,18 +436,30 @@ confidence=HIGH,
421436# --enable=similarities". If you want to run only the classes checker, but have
422437# no Warning level messages displayed, use "--disable=all --enable=classes
423438# --disable=W".
424- disable =too-many-arguments,
425- too-many-locals,
426- too-many-branches,
427- protected-access
428-
439+ disable =raw-checker-failed,
440+ bad-inline-option,
441+ locally-disabled,
442+ file-ignored,
443+ suppressed-message,
444+ useless-suppression,
445+ deprecated-pragma,
446+ use-symbolic-message-instead,
447+ use-implicit-booleaness-not-comparison-to-string,
448+ use-implicit-booleaness-not-comparison-to-zero,
429449
430450# Enable the message, report, category or checker with the given id(s). You can
431451# either give multiple identifier separated by comma (,) or put this option
432452# multiple time (only on the command line, not in the configuration file where
433453# it should appear only once). See also the "--disable" option for examples.
434454enable =
435455
456+ [MASTER]
457+ # A comma-separated list of package or module names
458+ # from where C extensions may#be loaded. Extensions
459+ # are loading into the active Python interpreter and
460+ # may run arbitrary code .
461+ extension-pkg-allow-list =torch,transformers
462+
436463
437464[METHOD_ARGS]
438465
@@ -443,9 +470,13 @@ timeout-methods=requests.api.delete,requests.api.get,requests.api.head,requests.
443470
444471[MISCELLANEOUS]
445472
473+ # Whether or not to search for fixme's in docstrings.
474+ check-fixme-in-docstring =no
475+
446476# List of note tags to take in consideration, separated by a comma.
447477notes =FIXME,
448- XXX
478+ XXX,
479+ TODO
449480
450481# Regular expression of note tags to take in consideration.
451482notes-rgx =
@@ -465,7 +496,7 @@ never-returning-functions=sys.exit,argparse.parse_error
465496# Let 'consider-using-join' be raised when the separator to join on would be
466497# non-empty (resulting in expected fixes of the type: ``"- " + " -
467498# ".join(items)``)
468- # suggest-join-with-non-empty-separator=yes
499+ suggest-join-with-non-empty-separator =yes
469500
470501
471502[REPORTS]
@@ -481,10 +512,10 @@ evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor
481512# used to format the message information. See doc for all details.
482513msg-template =
483514
484- # Set the output format. Available formats are: text, parseable, colorized ,
485- # json2 (improved json format), json (old json format) and msvs (visual
486- # studio). You can also give a reporter class, e.g.
487- # mypackage.mymodule.MyReporterClass.
515+ # Set the output format. Available formats are: ' text', ' parseable' ,
516+ # 'colorized', ' json2' (improved json format), ' json' (old json format), msvs
517+ # (visual studio) and 'github' (GitHub actions) . You can also give a reporter
518+ # class, e.g. mypackage.mymodule.MyReporterClass.
488519# output-format=
489520
490521# Tells whether to display a full report or only the messages.
@@ -582,11 +613,14 @@ ignored-checks-for-mixins=no-member,
582613# qualified names.
583614ignored-classes =optparse.Values,thread._local,_thread._local,argparse.Namespace
584615
616+
617+ ignored-modules =torch,torch.distributed,transformers,transformers.hf_argparser
618+
585619# Show a hint with possible names when a member name was not found. The aspect
586620# of finding the hint is based on edit distance.
587621missing-member-hint =yes
588622
589- # The minimum edit distance a name should have in order to be considered a
623+ # The maximum edit distance a name should have in order to be considered a
590624# similar match for a missing member name.
591625missing-member-hint-distance =1
592626
@@ -630,4 +664,4 @@ init-import=no
630664
631665# List of qualified module names which can have objects that can redefine
632666# builtins.
633- redefining-builtins-modules =six.moves,past.builtins,future.builtins,builtins,io
667+ redefining-builtins-modules =six.moves,past.builtins,future.builtins,builtins,io
0 commit comments