From a7f7239212eb4cf5d329efa510fd01559e150379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Tue, 16 Jun 2026 08:57:41 +0200 Subject: [PATCH 1/2] params: avoid using deprecated argparse.FileType --- pyulog/params.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pyulog/params.py b/pyulog/params.py index 9c4b05f..be4d422 100644 --- a/pyulog/params.py +++ b/pyulog/params.py @@ -7,7 +7,7 @@ import sys from .core import ULog -#pylint: disable=unused-variable, too-many-branches +#pylint: disable=unused-variable, too-many-branches, consider-using-with def get_defaults(ulog, default): """ get default params from ulog """ @@ -35,8 +35,8 @@ def main(): help='csv|octave|qgc', default='csv') parser.add_argument('output_filename', metavar='params.txt', - type=argparse.FileType('w'), nargs='?', - help='Output filename (default=stdout)', default=sys.stdout) + type=str, nargs='?', + help='Output filename (default=stdout)', default=None) parser.add_argument('--ignore', dest='ignore', action='store_true', help='Ignore string parsing exceptions', default=False) @@ -62,7 +62,8 @@ def main(): param_keys = sorted(params.keys()) delimiter = args.delimiter - output_file = args.output_filename + output_file = sys.stdout if args.output_filename is None \ + else open(args.output_filename, 'w', encoding='utf-8') if args.format == "csv": for param_key in param_keys: From 45b2280ab6b43bb09b2e0581d77776568e3a783b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Tue, 16 Jun 2026 08:58:09 +0200 Subject: [PATCH 2/2] pylintrc: update to version 4.0.6 --- pylintrc | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/pylintrc b/pylintrc index 2c6d8b7..e847a9a 100644 --- a/pylintrc +++ b/pylintrc @@ -39,7 +39,7 @@ extension-pkg-whitelist= fail-on= # Specify a score threshold under which the program will exit with error. -fail-under=10 +fail-under=10.0 # Interpret the stdin as a python script, whose filename needs to be passed as # the module_or_package argument. @@ -104,10 +104,6 @@ recursive=no # source root. source-roots= -# When enabled, pylint would attempt to guess common misconfiguration and emit -# user-friendly hints instead of false-positive error messages. -suggestion-mode=yes - # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. unsafe-load-any-extension=no @@ -237,6 +233,11 @@ name-group= # not require a docstring. no-docstring-rgx=^_ +# Regular expression matching correct parameter specification variable names. +# If left empty, parameter specification variable names will be checked with +# the set naming style. +#paramspec-rgx= + # List of decorators that produce properties, such as abc.abstractproperty. Add # to this list to register other decorators that produce valid properties. # These decorators are taken in consideration only for invalid-name. @@ -250,6 +251,10 @@ property-classes=abc.abstractproperty # variable names will be checked with the set naming style. #typevar-rgx= +# Regular expression matching correct type variable tuple names. If left empty, +# type variable tuple names will be checked with the set naming style. +#typevartuple-rgx= + # Naming style matching correct variable names. variable-naming-style=snake_case @@ -349,7 +354,9 @@ indent-after-paren=4 # tab). indent-string=' ' -# Maximum number of characters on a single line. +# Maximum number of characters on a single line. Pylint's default of 100 is +# based on PEP 8's guidance that teams may choose line lengths up to 99 +# characters. max-line-length=100 # Maximum number of lines in a module. @@ -472,6 +479,9 @@ timeout-methods=requests.api.delete,requests.api.get,requests.api.head,requests. [MISCELLANEOUS] +# Whether or not to search for fixme's in docstrings. +check-fixme-in-docstring=no + # List of note tags to take in consideration, separated by a comma. notes=FIXME, XXX, @@ -511,10 +521,10 @@ evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / stateme # used to format the message information. See doc for all details. msg-template= -# Set the output format. Available formats are: text, parseable, colorized, -# json2 (improved json format), json (old json format) and msvs (visual -# studio). You can also give a reporter class, e.g. -# mypackage.mymodule.MyReporterClass. +# Set the output format. Available formats are: 'text', 'parseable', +# 'colorized', 'json2' (improved json format), 'json' (old json format), msvs +# (visual studio) and 'github' (GitHub actions). You can also give a reporter +# class, e.g. mypackage.mymodule.MyReporterClass. #output-format= # Tells whether to display a full report or only the messages. @@ -616,7 +626,7 @@ ignored-classes=optparse.Values,thread._local,_thread._local # of finding the hint is based on edit distance. missing-member-hint=yes -# The minimum edit distance a name should have in order to be considered a +# The maximum edit distance a name should have in order to be considered a # similar match for a missing member name. missing-member-hint-distance=1