forked from pymodbus-dev/pymodbus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.cfg
550 lines (408 loc) · 14.4 KB
/
setup.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
[metadata]
name = pymodbus
version = attr: pymodbus.__version__
author = attr: pymodbus.__author__
maintainer = attr: pymodbus.__maintainer__
license = BSD-3-Clause
platforms = 'Linux', 'Mac OS X', 'Win'
description = A fully featured modbus protocol stack in python
keywords = modbus, asyncio, scada, client, server, simulator
long_description = file: README.rst
url = https://github.com/riptideio/pymodbus/
classifiers =
Development Status :: 4 - Beta
Environment :: Console
Framework :: AsyncIO
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Operating System :: POSIX :: Linux
Operating System :: Unix
Operating System :: MacOS :: MacOS X
Operating System :: OS Independent
Operating System :: Microsoft
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: System :: Networking
Topic :: Utilities
project_urls =
Source Code = https://github.com/riptideio/pymodbus
Bug Reports = https://github.com/riptideio/pymodbus/issues
Docs: Dev = https://pymodbus.readthedocs.io/en/latest/?badge=latest
Discord = https://discord.gg/vcP8qAz2
[options]
packages = find:
include_package_data = True
zip_safe = True
python_requires = >=3.8.0
#install_requires --> setup.py
#extras_require --> setup.py
#cmdclass --> setup.py
[options.exclude_package_data]
'' =
examples
test
tools
doc
[options.entry_points]
console_scripts =
pymodbus.console = pymodbus.repl.client.main:main
pymodbus.server = pymodbus.repl.server.main:app
[options.packages.find]
include = pymodbus*
[pylint.master]
# Specify a configuration file.
#rcfile=
# Python code to execute.
#init-hook=
# Files or directories to be skipped.
#ignore=CVS
# Add files or directories matching the regex patterns to the ignore-list.
ignore-paths=
examples/common/tornado_twisted,
examples/contrib/tornado_twisted,
examples/contrib/libmodbus_client.py
ignore-patterns=^\.#
# Pickle collected data for later comparisons.
persistent=no
# List of plugins
load-plugins=
pylint.extensions.bad_builtin,
pylint.extensions.check_elif,
pylint.extensions.code_style,
pylint.extensions.comparetozero,
pylint.extensions.comparison_placement,
pylint.extensions.confusing_elif,
pylint.extensions.docparams,
pylint.extensions.docstyle,
pylint.extensions.emptystring,
pylint.extensions.eq_without_hash,
pylint.extensions.for_any_all,
pylint.extensions.mccabe,
pylint.extensions.overlapping_exceptions,
pylint.extensions.private_import,
pylint.extensions.set_membership,
pylint.extensions.typing,
# NOT WANTED:
# pylint.extensions.broad_try_clause,
# pylint.extensions.consider_ternary_expression,
# pylint.extensions.empty_comment,
# pylint.extensions.redefined_variable_type,
# pylint.extensions.while_used,
# Use multiple processes to speed up Pylint, 0 will auto-detect.
jobs=0
# pylint would attempt to guess common misconfiguration.
suggestion-mode=yes
# Allow loading of arbitrary C extensions.
unsafe-load-any-extension=no
# package or module names from where C extensions may be loaded.
extension-pkg-allow-list=
# Minimum supported python version
py-version = 3.8.0
# Amount of potential inferred values with a single object.
limit-inference-results=100
# Specify a score threshold to be exceeded before program exits with error.
fail-under=10.0
# Return non-zero exit code if any of these messages/categories are detected.
fail-on=
[pylint.messages_control]
# Only show warnings with the listed confidence levels.
# confidence=
# Enable/Disable the message/report/category/checker with the given id(s).
enable=all
disable=
duplicate-code, # TBD
file-ignored, # ONLY to be used with extreme care.
format, # NOT wanted, handled by black
locally-disabled, # NOT wanted
suppressed-message, # NOT wanted
[pylint.reports]
# Set the output format.
output-format=text
# Tells whether to display a full report or only the messages
reports=no
# Python expression which should return a note less than 10.
evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))
# Template used to display messages.
#msg-template=
# Activate the evaluation score.
score=yes
[pylint.logging]
# Logging modules to check the string format.
logging-modules=logging
# The type of string formatting that logging methods do.
logging-format-style=new
[pylint.miscellaneous]
# List of note tags/regular expression to take in consideration.
notes=FIXME,XXX,TODO
#notes-rgx=
[pylint.similarities]
# Minimum lines number of a similarity.
min-similarity-lines=4
# Ignore comments when computing similarities.
ignore-comments=yes
# Ignore docstrings when computing similarities.
ignore-docstrings=yes
# Ignore imports when computing similarities.
ignore-imports=no
# Signatures are removed from the similarity computation
ignore-signatures=no
[pylint.variables]
# Tells whether we should check for unused import in __init__ files.
init-import=no
# A regular expression matching the name of dummy variables
#dummy-variables-rgx=_$|dummy
dummy-variables-rgx=
# List of additional names supposed to be defined in builtins.
additional-builtins=
# List of strings which can identify a callback function by name.
#callbacks=cb_,_cb
callbacks=
# Tells whether unused global variables should be treated as a violation.
allow-global-unused-variables=yes
# List of names allowed to shadow builtins
allowed-redefined-builtins=
# Argument names that match this expression will be ignored.
ignored-argument-names=_.*
# List of qualified module names which can have objects that can redefine
# builtins.
#redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
redefining-builtins-modules=past.builtins,future.builtins,builtins,io
[pylint.format]
# Maximum number of characters on a single line.
max-line-length=100
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# Allow the body of an if to be on the same line.
single-line-if-stmt=no
# Allow the body of a class to be on the same line as the declaration
single-line-class-stmt=no
# Maximum number of lines in a module
max-module-lines=2000
# String used as indentation unit.
indent-string=' '
indent-after-paren=4
# Expected format of line ending.
#expected-line-ending-format=
[pylint.basic]
# Good variable names which should always be accepted.
#good-names=i,j,k,run,_
good-names=i,j,k,rr,rq,fd,_
#good-names-rgxs=
# Bad variable names which should always be refused, separated by a comma
bad-names=foo,bar,baz,toto,tutu,tata
bad-names-rgxs=
# Colon-delimited sets of names that determine each other's naming style when
# the name regexes allow several styles.
name-group=
# Include a hint for the correct naming format with invalid-name
include-naming-hint=no
# Naming style matching correct function names.
function-naming-style=snake_case
function-rgx=[a-z_][a-z0-9_]{2,30}$
# Naming style matching correct variable names.
variable-naming-style=snake_case
variable-rgx=[a-z_][a-z0-9_]{2,30}$
# Naming style matching correct constant names.
const-naming-style=UPPER_CASE
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
# Naming style matching correct attribute names.
attr-naming-style=snake_case
attr-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
# Naming style matching correct argument names.
argument-naming-style=snake_case
argument-rgx=[a-z_][a-z0-9_]{2,30}$
# Naming style matching correct class attribute names.
class-attribute-naming-style=any
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
# Naming style matching correct class constant names.
class-const-naming-style=UPPER_CASE
#class-const-rgx=
# Naming style matching correct inline iteration names.
inlinevar-naming-style=any
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
# Naming style matching correct class names.
class-naming-style=PascalCase
class-rgx=[A-Z_][a-zA-Z0-9]+$
# Naming style matching correct module names.
module-naming-style=snake_case
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
# Naming style matching correct method names.
method-naming-style=snake_case
method-rgx=(([a-z_][a-z0-9_]{2,})|(a[A-Z][a-z0-9_]{2,}))$
# function or class names that do not require a docstring.
no-docstring-rgx=__.*__
# Minimum line length for functions/classes that require docstrings.
docstring-min-length=-1
# List of decorators that define properties, such as abc.abstractproperty.
property-classes=abc.abstractproperty
[pylint.typecheck]
# Regex pattern to define which classes are considered mixins
mixin-class-rgx=.*MixIn
# List of module names for which member attributes should not be checked.
ignored-modules=
# List of class names for which member attributes should not be checked.
ignored-classes=SQLObject, optparse.Values, thread._local, _thread._local
# List of members which are set dynamically.
generated-members=REQUEST,acl_users,aq_parent,argparse.Namespace
# List of decorators that create context managers from functions.
contextmanager-decorators=contextlib.contextmanager
# Warn about missing members when the attribute can be None.
ignore-none=yes
# This flag controls whether pylint should warn about no-member
ignore-on-opaque-inference=yes
# Show a hint with possible names when a member name was not found.
missing-member-hint=yes
# The minimum edit distance a name should have.
missing-member-hint-distance=1
# The total number of similar names that should be taken in consideration.
missing-member-max-choices=1
[pylint.spelling]
# Spelling dictionary name.
spelling-dict=
# List of comma separated words that should not be checked.
spelling-ignore-words=
# List of comma separated words that should be considered directives.
spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
# A path to a file that contains private dictionary; one word per line.
spelling-private-dict-file=
# Tells whether to store unknown words.
spelling-store-unknown-words=no
# Limits count of emitted suggestions for spelling mistakes.
max-spelling-suggestions=4
[pylint.design]
# Maximum number of arguments for function / method
max-args=10
# Maximum number of locals for function / method body
max-locals=25
# Maximum number of return / yield for function / method body
max-returns=11
# Maximum number of branch for function / method body
max-branches=27
# Maximum number of statements in function / method body
max-statements=100
# Maximum number of parents for a class (see R0901).
max-parents=7
# List of qualified class names to ignore when counting class parents.
ignored-parents=
# Maximum number of attributes for a class (see R0902).
max-attributes=20
# Minimum number of public methods for a class (see R0903).
min-public-methods=2
# Maximum number of public methods for a class (see R0904).
max-public-methods=25
# Maximum number of boolean expressions in an if statement (see R0916).
max-bool-expr=5
# Regular expressions of class ancestor names to ignore.
exclude-too-few-public-methods=
[pylint.classes]
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,__new__,setUp,__post_init__
# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls
# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg=mcs
# List of member names, which should be excluded from the protected access
# warning.
exclude-protected=_asdict,_fields,_replace,_source,_make
# Warn about protected attribute access inside special methods
check-protected-access-in-special-methods=no
[pylint.imports]
# List of modules that can be imported at any level.
#allow-any-import-level=
allow-any-import-level=no
# Allow wildcard imports from modules that define __all__.
allow-wildcard-with-all=no
# Analyse import fallback blocks.
analyse-fallback-blocks=no
# Deprecated modules which should not be used, separated by a comma
deprecated-modules=regsub,TERMIOS,Bastion,rexec
# Create a graph of every dependencies.
import-graph=
ext-import-graph=
int-import-graph=
# import to recognize a module as a standard compatibility libraries.
known-standard-library=
# Force import order to recognize a module as part of a third party library.
known-third-party=enchant
# Couples of modules and preferred modules, separated by a comma.
preferred-modules=
[pylint.exceptions]
# Exceptions that will emit a warning when being caught.
overgeneral-exceptions=Exception
[pylint.typing]
# app / library does need runtime introspection of type annotations.
runtime-typing = true
[pylint.deprecated_builtins]
# List of builtins function names that should not be used.
bad-functions=map,input
[pylint.refactoring]
# Maximum number of nested blocks for function / method body
max-nested-blocks=5
# Complete name of functions that never returns.
never-returning-functions=sys.exit,argparse.parse_error
[pylint.string]
# inconsistent-quotes generates a warning.
check-quote-consistency=no
# implicit-str-concat should generate a warning.
check-str-concat-over-line-jumps=no
[pylint.code_style]
# Max line length for which to sill emit suggestions.
#max-line-length-suggestions=
[flake8]
exclude = .venv,.git,.tox,venv,build,tornado_twisted,examples/contrib/libmodbus_client.py
max-complexity = 25
doctests = True
max-line-length = 120
# To work with Black
# D202 No blank lines allowed after function docstring
# E203: Whitespace before ':'
# E501: line too long
# W503: Line break occurred before a binary operator
# W504 line break after binary operator
ignore =
D202,
E203,
E501,
W503,
W504,
D211,
D400,
E731,
W503
noqa-require-code = True
[aliases]
upload_docs = build_sphinx upload_docs
package = build_apidocs build_sphinx sdist
test=pytest
[egg_info]
#tag_build = dev
tag_svn_revision = false
[build-sphinx]
source-dir = doc/sphinx/
build-dir = doc/sphinx/build
all_files = 1
[upload_docs]
upload_dir = build/sphinx/html
[bdist_wheel]
universal=1
[tool:pytest]
testpaths = test
addopts = -p no:warnings
asyncio_mode = auto
[coverage:run]
include =
pymodbus/
test/
omit =
test/TO_DO_REWRITE
examples/common/tornado_twister
examples/contrib/tornado_twister
[isort]
py_version=38
profile=black
line_length = 79
lines_after_imports = 2
known_local_folder =
common
contrib