diff options
author | yushao2 <36848472+yushao2@users.noreply.github.com> | 2023-01-28 23:52:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-28 16:52:47 +0100 |
commit | 2cfc8f5d38a2e0ea46be7b3908729cca8c8fb8c4 (patch) | |
tree | 80e0d17cb484c51703356b86ed73d975b0417a6e /doc/user_guide | |
parent | 660405e6218258cee90570e8037c3b5e1440dcb6 (diff) | |
download | pylint-git-2cfc8f5d38a2e0ea46be7b3908729cca8c8fb8c4.tar.gz |
feat(6489): implement `positional-only-arguments-expected` checker (#8121)
* feat(6489): implement positional-only-arguments-expected checker
* Update doc/user_guide/configuration/all-options.rst
* update good/bad examples
Diffstat (limited to 'doc/user_guide')
-rw-r--r-- | doc/user_guide/checkers/features.rst | 6 | ||||
-rw-r--r-- | doc/user_guide/messages/messages_overview.rst | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/doc/user_guide/checkers/features.rst b/doc/user_guide/checkers/features.rst index fa5d0f8bd..104b8b40e 100644 --- a/doc/user_guide/checkers/features.rst +++ b/doc/user_guide/checkers/features.rst @@ -474,7 +474,7 @@ Exceptions checker Messages program errors, use ``except Exception:`` (bare except is equivalent to ``except BaseException:``). :broad-exception-raised (W0719): *Raising too general exception: %s* - Raising exceptions that are too generic force you to catch exception + Raising exceptions that are too generic force you to catch exceptions generically too. It will force you to use a naked ``except Exception:`` clause. You might then end up catching exceptions other than the ones you expect to catch. This can hide bugs or make it harder to debug programs when @@ -643,6 +643,10 @@ See also :ref:`method_args checker's options' documentation <method_args-options Method Args checker Messages ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +:positional-only-arguments-expected (E3102): *%s() got some positional-only arguments passed as keyword arguments: %s* + Emitted when positional-only arguments have been passed as keyword arguments. + Remove the keywords for the affected arguments in the function call. This + message can't be emitted when using Python < 3.8. :missing-timeout (W3101): *Missing timeout argument for method '%s' can cause your program to hang indefinitely* Used when a method needs a 'timeout' parameter in order to avoid waiting for a long time. If no timeout is specified explicitly the default value is used. diff --git a/doc/user_guide/messages/messages_overview.rst b/doc/user_guide/messages/messages_overview.rst index bea3714b4..6c4405b42 100644 --- a/doc/user_guide/messages/messages_overview.rst +++ b/doc/user_guide/messages/messages_overview.rst @@ -137,6 +137,7 @@ All messages in the error category: error/not-context-manager error/not-in-loop error/notimplemented-raised + error/positional-only-arguments-expected error/potential-index-error error/raising-bad-type error/raising-non-exception |