Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 21 additions & 11 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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

Expand Down
9 changes: 5 additions & 4 deletions pyulog/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 """
Expand Down Expand Up @@ -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)
Expand All @@ -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:
Expand Down
Loading