Skip to content

Commit

Permalink
Disable the inconsistent-return-statements warning of Pylint globally.
Browse files Browse the repository at this point in the history
For pylint 2.7, this warning appears multiple times and is related to using the `augment_excmessage` function of module `objecttools`. Pylint does not understand that this function never returns.

I opened issue pylint-dev/pylint#4122. Once accepted and implemented, we can reverse this commit. If the proposal is rejected, we have to decide whether we want to keep the global setting or write the corresponding comment to each individual corresponding function call.

It seems like Pylint does not understand some of our descriptors (e.g. `_PubProperty`) well enough and thus raises false-positive `no-member´ warnings.

This seems to be a know issue.  If someone fixes pylint-dev/pylint#3684, we can revert this commit.

Adding local disable-statements would be much effort. It seems better to wait and further improve our type hints in the meantime, so that Mypy can step in to catch potential `no-member` bugs.
  • Loading branch information
tyralla committed Feb 24, 2021
1 parent 0e3a4a3 commit 8340f80
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ disable=attribute-defined-outside-init,
exec-used,
function-redefined,
global-statement,
inconsistent-return-statements,
no-member,
too-many-function-args,
trailing-comma-tuple,
Expand Down

0 comments on commit 8340f80

Please sign in to comment.