Fix up pylint notes in configuring.asciidoc.
- Use short form of pylint disable - Update the following code block as well - Add pylint ignore for missing-module-docstring
This commit is contained in:
parent
69ced4e033
commit
dde50c23bc
@ -349,13 +349,15 @@ bind_chained('<Escape>', 'clear-keychain', 'search')
|
|||||||
Avoiding flake8 errors
|
Avoiding flake8 errors
|
||||||
^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
If you use an editor with flake8 and pylint integration which complains about
|
If you use an editor with flake8 and pylint integration, it may have some
|
||||||
`c` and `config` being undefined or invalid, you can use:
|
complaints about invalid names, undefined variables, or missing docstrings.
|
||||||
|
You can silence those with:
|
||||||
|
|
||||||
[source,python]
|
[source,python]
|
||||||
----
|
----
|
||||||
c = c # noqa: F821 pylint: disable=invalid-name,undefined-variable
|
# pylint: disable=C0111
|
||||||
config = config # noqa: F821 pylint: disable=invalid-name,undefined-variable
|
c = c # noqa: F821 pylint: disable=E0602,C0103
|
||||||
|
config = config # noqa: F821 pylint: disable=E0602,C0103
|
||||||
----
|
----
|
||||||
|
|
||||||
For type annotation support (note that those imports aren't guaranteed to be
|
For type annotation support (note that those imports aren't guaranteed to be
|
||||||
@ -363,8 +365,9 @@ stable across qutebrowser versions):
|
|||||||
|
|
||||||
[source,python]
|
[source,python]
|
||||||
----
|
----
|
||||||
|
# pylint: disable=C0111
|
||||||
from qutebrowser.config.configfiles import ConfigAPI # noqa: F401
|
from qutebrowser.config.configfiles import ConfigAPI # noqa: F401
|
||||||
from qutebrowser.config.config import ConfigContainer # noqa: F401
|
from qutebrowser.config.config import ConfigContainer # noqa: F401
|
||||||
config = config # type: ConfigAPI # noqa: F821
|
config = config # type: ConfigAPI # noqa: F821 pylint: disable=E0602,C0103
|
||||||
c = c # type: ConfigContainer # noqa: F821
|
c = c # type: ConfigContainer # noqa: F821 pylint: disable=E0602,C0103
|
||||||
----
|
----
|
||||||
|
Loading…
Reference in New Issue
Block a user