Skip to content
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.

Commit

Permalink
pylint: enable various optional checks/extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
fphammerle committed Jun 4, 2022
1 parent ac75480 commit f0e1a0c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
25 changes: 23 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
[MESSAGE CONTROL]
[MASTER]

disable=missing-docstring
load-plugins=pylint.extensions.bad_builtin,
pylint.extensions.check_elif,
pylint.extensions.comparison_placement,
pylint.extensions.confusing_elif,
pylint.extensions.consider_ternary_expression,
pylint.extensions.emptystring,
pylint.extensions.eq_without_hash,
pylint.extensions.for_any_all,
pylint.extensions.mccabe,
pylint.extensions.no_self_use,
pylint.extensions.overlapping_exceptions,
pylint.extensions.private_import,
pylint.extensions.redefined_loop_name,
pylint.extensions.redefined_variable_type,
pylint.extensions.set_membership,
pylint.extensions.typing

[MESSAGES CONTROL]

disable=consider-alternative-union-syntax, # requires python>=3.10
deprecated-typing-alias, # requires python>=3.9, e.g. for dict[...]
missing-docstring
2 changes: 1 addition & 1 deletion freesurfer_stats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def _read_headers(self, stream: typing.TextIO) -> None:
if line:
attr_name, attr_value_str = line.split(" ", maxsplit=1)
attr_value_str = attr_value_str.lstrip()
if attr_name in ["cvs_version", "mrisurf.c-cvs_version"]:
if attr_name in {"cvs_version", "mrisurf.c-cvs_version"}:
attr_value = typing.cast(
typing.Union[str, datetime.datetime],
attr_value_str.strip("$").rstrip(),
Expand Down

0 comments on commit f0e1a0c

Please sign in to comment.