Skip to content

Commit c9bf424

Browse files
committed
Refactor communicate for better readability
Also improve performance on larger documents. Signed-off-by: rany2 <[email protected]>
1 parent df6bac8 commit c9bf424

File tree

2 files changed

+229
-184
lines changed

2 files changed

+229
-184
lines changed

pylintrc

+43-19
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
# only in one or another interpreter, leading to false positives when analysed.
66
analyse-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+
812
# Load and enable all available extensions. Use --list-extensions to see a list
913
# all available extensions.
1014
#enable-all-extensions=
@@ -46,8 +50,8 @@ ignore=CVS
4650

4751
# Add files or directories matching the regular expressions patterns to the
4852
# ignore-list. The regex matches against paths and can be in Posix or Windows
49-
# format. Because '\' represents the directory delimiter on Windows systems, it
50-
# can't be used as an escape character.
53+
# format. Because '\\' represents the directory delimiter on Windows systems,
54+
# it can't be used as an escape character.
5155
ignore-paths=
5256

5357
# Files or directories matching the regular expression patterns are skipped.
@@ -84,11 +88,17 @@ persistent=yes
8488

8589
# Minimum Python version to use for version dependent checks. Will default to
8690
# the version used to run pylint.
87-
py-version=3.10
91+
py-version=3.11
8892

8993
# Discover python modules and packages in the file system subtree.
9094
recursive=no
9195

96+
# Add paths to the list of the source roots. Supports globbing patterns. The
97+
# source root is an absolute path or a path relative to the current working
98+
# directory used to determine a package namespace for modules located under the
99+
# source root.
100+
source-roots=
101+
92102
# When enabled, pylint would attempt to guess common misconfiguration and emit
93103
# user-friendly hints instead of false-positive error messages.
94104
suggestion-mode=yes
@@ -224,6 +234,10 @@ no-docstring-rgx=^_
224234
# These decorators are taken in consideration only for invalid-name.
225235
property-classes=abc.abstractproperty
226236

237+
# Regular expression matching correct type alias names. If left empty, type
238+
# alias names will be checked with the set naming style.
239+
#typealias-rgx=
240+
227241
# Regular expression matching correct type variable names. If left empty, type
228242
# variable names will be checked with the set naming style.
229243
#typevar-rgx=
@@ -246,21 +260,18 @@ check-protected-access-in-special-methods=no
246260
defining-attr-methods=__init__,
247261
__new__,
248262
setUp,
263+
asyncSetUp,
249264
__post_init__
250265

251266
# List of member names, which should be excluded from the protected access
252267
# warning.
253-
exclude-protected=_asdict,
254-
_fields,
255-
_replace,
256-
_source,
257-
_make
268+
exclude-protected=_asdict,_fields,_replace,_source,_make,os._exit
258269

259270
# List of valid names for the first argument in a class method.
260271
valid-classmethod-first-arg=cls
261272

262273
# List of valid names for the first argument in a metaclass class method.
263-
valid-metaclass-classmethod-first-arg=cls
274+
valid-metaclass-classmethod-first-arg=mcs
264275

265276

266277
[DESIGN]
@@ -274,7 +285,7 @@ exclude-too-few-public-methods=
274285
ignored-parents=
275286

276287
# Maximum number of arguments for function / method.
277-
max-args=5
288+
max-args=10
278289

279290
# Maximum number of attributes for a class (see R0902).
280291
max-attributes=7
@@ -307,8 +318,7 @@ min-public-methods=2
307318
[EXCEPTIONS]
308319

309320
# Exceptions that will emit a warning when caught.
310-
overgeneral-exceptions=builtins.BaseException,
311-
builtins.Exception
321+
overgeneral-exceptions=builtins.BaseException,builtins.Exception
312322

313323

314324
[FORMAT]
@@ -327,7 +337,7 @@ indent-after-paren=4
327337
indent-string=' '
328338

329339
# Maximum number of characters on a single line.
330-
max-line-length=240
340+
max-line-length=100
331341

332342
# Maximum number of lines in a module.
333343
max-module-lines=1000
@@ -347,6 +357,9 @@ single-line-if-stmt=no
347357
# one.
348358
allow-any-import-level=
349359

360+
# Allow explicit reexports by alias from a package __init__.
361+
allow-reexport-from-package=no
362+
350363
# Allow wildcard imports from modules that define __all__.
351364
allow-wildcard-with-all=no
352365

@@ -408,14 +421,24 @@ confidence=HIGH,
408421
# --enable=similarities". If you want to run only the classes checker, but have
409422
# no Warning level messages displayed, use "--disable=all --enable=classes
410423
# --disable=W".
411-
disable=duplicate-code,
424+
disable=raw-checker-failed,
425+
bad-inline-option,
426+
locally-disabled,
427+
file-ignored,
428+
suppressed-message,
429+
useless-suppression,
430+
deprecated-pragma,
431+
use-symbolic-message-instead,
432+
use-implicit-booleaness-not-comparison-to-string,
433+
use-implicit-booleaness-not-comparison-to-zero,
434+
duplicate-code,
412435
consider-using-with
413436

414437
# Enable the message, report, category or checker with the given id(s). You can
415438
# either give multiple identifier separated by comma (,) or put this option
416439
# multiple time (only on the command line, not in the configuration file where
417440
# it should appear only once). See also the "--disable" option for examples.
418-
enable=c-extension-no-member
441+
enable=
419442

420443

421444
[METHOD_ARGS]
@@ -461,8 +484,9 @@ evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor
461484
# used to format the message information. See doc for all details.
462485
msg-template=
463486

464-
# Set the output format. Available formats are text, parseable, colorized, json
465-
# and msvs (visual studio). You can also give a reporter class, e.g.
487+
# Set the output format. Available formats are: text, parseable, colorized,
488+
# json2 (improved json format), json (old json format) and msvs (visual
489+
# studio). You can also give a reporter class, e.g.
466490
# mypackage.mymodule.MyReporterClass.
467491
#output-format=
468492

@@ -496,8 +520,8 @@ min-similarity-lines=4
496520
# Limits count of emitted suggestions for spelling mistakes.
497521
max-spelling-suggestions=4
498522

499-
# Spelling dictionary name. Available dictionaries: none. To make it work,
500-
# install the 'python-enchant' package.
523+
# Spelling dictionary name. No available dictionaries : You need to install
524+
# both the python package and the system dependency for enchant to work.
501525
spelling-dict=
502526

503527
# List of comma separated words that should be considered directives if they

0 commit comments

Comments
 (0)