Skip to content

Commit

Permalink
Fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
decaz authored and mosquito committed Sep 3, 2019
1 parent 728869b commit 83bf56d
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 44 deletions.
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,13 @@ Clone the project:
git clone https://github.com/mosquito/aio-pika.git
cd aio-pika
Create a new virtualenv for `aio_pika`_:
Create a new virtualenv for `aio-pika`_:

.. code-block:: shell
virtualenv -p python3.5 env
Install all requirements for `aio_pika`_:
Install all requirements for `aio-pika`_:

.. code-block:: shell
Expand Down Expand Up @@ -269,4 +269,4 @@ The changes should follow simple rules:

.. _"thank's to" section: https://github.com/mosquito/aio-pika/blob/master/docs/source/index.rst#thanks-for-contributing
.. _Semantic Versioning: http://semver.org/
.. _aio_pika: https://github.com/mosquito/aio-pika/
.. _aio-pika: https://github.com/mosquito/aio-pika/
12 changes: 3 additions & 9 deletions aio_pika/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,24 +257,18 @@ async def main():
will be used keyword arguments.
:param host: hostname of the broker
:param port: broker port 5672 by default
:param login:
username string. `'guest'` by default. Provide empty string
for pika.credentials.ExternalCredentials usage.
:param login: username string. `'guest'` by default.
:param password: password string. `'guest'` by default.
:param virtualhost: virtualhost parameter. `'/'` by default
:param ssl:
use SSL for connection. Should be used with addition kwargs.
See `pika documentation`_ for more info.
:param ssl: use SSL for connection. Should be used with addition kwargs.
:param ssl_options: A dict of values for the SSL connection.
:param loop:
Event loop (:func:`asyncio.get_event_loop()` when :class:`None`)
:param connection_class: Factory of a new connection
:param kwargs:
addition parameters which will be passed to the pika connection.
:param kwargs: addition parameters which will be passed to the connection.
:return: :class:`aio_pika.connection.Connection`
.. _RFC3986: https://goo.gl/MzgYAs
.. _pika documentation: https://goo.gl/TdVuZ9
.. _official Python documentation: https://goo.gl/pty9xA
Expand Down
6 changes: 3 additions & 3 deletions aio_pika/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async def bind(
:param exchange: :class:`aio_pika.exchange.Exchange` instance
:param routing_key: routing key
:param arguments: additional arguments (will be passed to `pika`)
:param arguments: additional arguments
:param timeout: execution timeout
:return: :class:`None`
"""
Expand Down Expand Up @@ -146,7 +146,7 @@ async def unbind(
:param exchange: :class:`aio_pika.exchange.Exchange` instance
:param routing_key: routing key
:param arguments: additional arguments (will be passed to `pika`)
:param arguments: additional arguments
:param timeout: execution timeout
:return: :class:`None`
"""
Expand All @@ -171,7 +171,7 @@ async def publish(
immediate: bool = False, timeout: TimeoutType = None
) -> Optional[aiormq.types.ConfirmationFrameType]:

""" Publish the message to the queue. `aio_pika` use
""" Publish the message to the queue. `aio-pika` uses
`publisher confirms`_ extension for message delivery.
.. _publisher confirms: https://www.rabbitmq.com/confirms.html
Expand Down
14 changes: 7 additions & 7 deletions aio_pika/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def locked(self) -> bool:

@property
def properties(self) -> aiormq.spec.Basic.Properties:
""" Build :class:`pika.BasicProperties` object """
""" Build :class:`aiormq.spec.Basic.Properties` object """
return aiormq.spec.Basic.Properties(
content_type=self.content_type,
content_encoding=self.content_encoding,
Expand Down Expand Up @@ -410,7 +410,7 @@ def __copy__(self):


class IncomingMessage(Message):
""" Incoming message it's seems like Message but has additional methods for
""" Incoming message is seems like Message but has additional methods for
message acknowledgement.
Depending on the acknowledgement mode used, RabbitMQ can consider a
Expand Down Expand Up @@ -528,9 +528,9 @@ def ack(self, multiple: bool = False) -> asyncio.Task:
""" Send basic.ack is used for positive acknowledgements
.. note::
This method looks like a blocking-method, but actually it's
just send bytes to the socket and not required any responses
from the broker.
This method looks like a blocking-method, but actually it just
sends bytes to the socket and doesn't require any responses from
the broker.
:param multiple: If set to True, the message's delivery tag is
treated as "up to and including", so that multiple
Expand Down Expand Up @@ -561,8 +561,8 @@ def reject(self, requeue: bool = False) -> asyncio.Task:
Otherwise message will be dropped.
.. note::
This method looks like a blocking-method, but actually it's just
send bytes to the socket and not required any responses from
This method looks like a blocking-method, but actually it just
sends bytes to the socket and doesn't require any responses from
the broker.
:param requeue: bool
Expand Down
6 changes: 3 additions & 3 deletions aio_pika/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async def bind(
:param exchange: :class:`aio_pika.exchange.Exchange` instance
:param routing_key: routing key
:param arguments: additional arguments (will be passed to `pika`)
:param arguments: additional arguments
:param timeout: execution timeout
:raises asyncio.TimeoutError:
when the binding timeout period has elapsed.
Expand Down Expand Up @@ -138,7 +138,7 @@ async def unbind(
:param exchange: :class:`aio_pika.exchange.Exchange` instance
:param routing_key: routing key
:param arguments: additional arguments (will be passed to `pika`)
:param arguments: additional arguments
:param timeout: execution timeout
:raises asyncio.TimeoutError:
when the unbinding timeout period has elapsed.
Expand Down Expand Up @@ -181,7 +181,7 @@ async def consume(
be accessed by the current connection, and are deleted
when that connection closes. Passive declaration of an
exclusive queue by other connections are not allowed.
:param arguments: extended arguments for pika
:param arguments: additional arguments
:param consumer_tag: optional consumer tag
:raises asyncio.TimeoutError:
Expand Down
12 changes: 3 additions & 9 deletions aio_pika/robust_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,24 +202,18 @@ async def main():
will be used keyword arguments.
:param host: hostname of the broker
:param port: broker port 5672 by default
:param login:
username string. `'guest'` by default. Provide empty string
for pika.credentials.ExternalCredentials usage.
:param login: username string. `'guest'` by default.
:param password: password string. `'guest'` by default.
:param virtualhost: virtualhost parameter. `'/'` by default
:param ssl:
use SSL for connection. Should be used with addition kwargs.
See `pika documentation`_ for more info.
:param ssl: use SSL for connection. Should be used with addition kwargs.
:param ssl_options: A dict of values for the SSL connection.
:param loop:
Event loop (:func:`asyncio.get_event_loop()` when :class:`None`)
:param connection_class: Factory of a new connection
:param kwargs:
addition parameters which will be passed to the pika connection.
:param kwargs: addition parameters which will be passed to the connection.
:return: :class:`aio_pika.connection.Connection`
.. _RFC3986: https://goo.gl/MzgYAs
.. _pika documentation: https://goo.gl/TdVuZ9
.. _official Python documentation: https://goo.gl/pty9xA
"""
Expand Down
2 changes: 1 addition & 1 deletion aio_pika/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

def iscoroutinepartial(fn):
"""
Function returns True if function it's a partial instance of coroutine.
Function returns True if function is a partial instance of coroutine.
See additional information here_.
:param fn: Function
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
# html_theme_options = {}
html_theme_options = {
'codecov_button': True,
'description': 'Wrapper for the PIKA for asyncio and humans',
'description': 'Wrapper for the aiormq for asyncio and humans',
'github_banner': True,
'github_button': True,
'github_repo': 'aio-pika',
Expand Down
10 changes: 5 additions & 5 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
.. _aio_pika: https://github.com/mosquito/aio-pika
.. _aio-pika: https://github.com/mosquito/aio-pika
.. _asyncio: https://docs.python.org/3/library/asyncio.html
.. _PIKA: https://github.com/pika/pika
.. _aiormq: http://github.com/mosquito/aiormq/


Welcome to aio-pika's documentation!
Expand Down Expand Up @@ -33,7 +33,7 @@ Welcome to aio-pika's documentation!
:target: https://pypi.python.org/pypi/aio-pika/


`aio_pika`_ it's a wrapper for the `PIKA`_ for `asyncio`_ and humans.
`aio-pika`_ is a wrapper for the `aiormq`_ for `asyncio`_ and humans.


Features
Expand Down Expand Up @@ -80,13 +80,13 @@ Clone the project:
cd aio-pika
Create a new virtualenv for `aio_pika`_:
Create a new virtualenv for `aio-pika`_:

.. code-block:: shell
virtualenv -p python3.5 env
Install all requirements for `aio_pika`_:
Install all requirements for `aio-pika`_:

.. code-block:: shell
Expand Down
4 changes: 2 additions & 2 deletions docs/source/patterns.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.. _aio_pika: https://github.com/mosquito/aio-pika
.. _aio-pika: https://github.com/mosquito/aio-pika


Patterns and helpers
++++++++++++++++++++

.. note:: Available since `aio-pika>=1.7.0`

`aio_pika`_ includes some useful patterns for creating distributed systems.
`aio-pika`_ includes some useful patterns for creating distributed systems.


.. _patterns-worker:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/rabbitmq-tutorial/1-introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ command as many times as we like, and only one will be created.

.. note::
This article contains adopted official examples only.
But `aio_pika` allows to use Python 3.5+ `async for` notation.
But `aio-pika` allows to use Python 3.5+ `async for` notation.

For example:

Expand Down

0 comments on commit 83bf56d

Please sign in to comment.