Fix typos, grammar, and Flake8 references

This commit is contained in:
Jacobo de Vera 2022-10-17 23:16:13 +01:00
parent 41cdcbe10e
commit a46b9b0670
2 changed files with 9 additions and 8 deletions

View file

@ -24,11 +24,12 @@ how it needs to call it:
entry point references is called for each physical line and the call is
expected to yield results directly.
* If the callable has a parameter called ``logical_line`` then the callable
referred to by the entry point will be called from Flake8 with each logical
referred to by the entry point will be called from |Flake8| with each logical
line and is expected to yield results.
.. note::
Class-style plugins are only supported for AST checker (*tree*) plugins.
@ -38,15 +39,15 @@ The Results
Tree plugins
------------
A tree plugins can be a function or a class. If it is a function, it must take
A tree plugin can be a function or a class. If it is a function, it must take
a parameter called ``tree``. If it is a class, then the ``__init__`` method
must take this parameter.
For a class based plugin, the ``run`` method is in charge of yielding results.
For a class-based plugin, the ``run`` method is in charge of yielding results.
For functions, they must deliver results directly.
Flake8 expects the result of running these plugins to be an iterable of tuples,
each of which contain the following:
|Flake8| expects the result of running these plugins to be an iterable of
tuples, each of which contain the following:
* An ``int`` with the line number where the issue appears
@ -65,7 +66,7 @@ A Physical Line plugin must be callable, it must take a parameter called
``physical_line`` and it must return the result of checking the passed physical
line.
Flake8 expects the result of this call to be an iterable of tuples, each
|Flake8| expects the result of this call to be an iterable of tuples, each
containing the following:
* An ``int`` with the offset within the line where the reported issue appears
@ -80,7 +81,7 @@ A Logical Line plugin must be callable, it must take a parameter called
``logical_line`` and it must return the result of checking the passed logical
line.
Flake8 expects the result of this call to be an iterable of tuples, each
|Flake8| expects the result of this call to be an iterable of tuples, each
containing the following:
* An ``int`` with the offset within the logical line where the reported issue

View file

@ -4,7 +4,7 @@
Developing a Formatting Plugin for Flake8
===========================================
|Flake8| allowes for custom formatting plugins since version
|Flake8| allows for custom formatting plugins since version
3.0.0. Let's write a plugin together:
.. code-block:: python