From 0fd58c52ea79bc8120d9ec09f1cdd81ecdb85ee3 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 22 Jan 2020 23:55:54 +0100 Subject: [PATCH] Small doc fixes --- CONTRIBUTING.rst | 8 ++++---- README.rst | 24 ++++++++++++------------ docs/api/index.rst | 1 - docs/conf.py | 2 +- docs/faq.rst | 2 +- fbchat/_thread.py | 6 +++--- 6 files changed, 21 insertions(+), 22 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 3705320..0cd5c08 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -35,8 +35,8 @@ Checklist Once you're done with your work, please follow the steps below: -- Run `black .` to format your code. -- Run `pytest` to test your code. -- Run `make -C docs html` to verify that the docs still work. -- Run `make -C docs spelling` to check your spelling in docstrings. +- Run ``black .`` to format your code. +- Run ``pytest`` to test your code. +- Run ``make -C docs html``, and view the generated docs, to verify that the docs still work. +- Run ``make -C docs spelling`` to check your spelling in docstrings. - Create a pull request, and point it to ``master`` `here `__. diff --git a/README.rst b/README.rst index 520b5ff..09c3540 100644 --- a/README.rst +++ b/README.rst @@ -1,17 +1,17 @@ ``fbchat`` - Facebook Messenger for Python ========================================== -.. image:: https://badgen.net/pypi/license/fbchat - :target: https://github.com/carpedm20/fbchat/tree/master/LICENSE - :alt: License: BSD 3-Clause +.. image:: https://badgen.net/pypi/v/fbchat + :target: https://pypi.python.org/pypi/fbchat + :alt: Project version .. image:: https://badgen.net/badge/python/3.5,3.6,3.7,3.8,pypy?list=| :target: https://pypi.python.org/pypi/fbchat :alt: Supported python versions: 3.5, 3.6, 3.7, 3.8 and pypy -.. image:: https://badgen.net/pypi/v/fbchat - :target: https://pypi.python.org/pypi/fbchat - :alt: Project version +.. image:: https://badgen.net/pypi/license/fbchat + :target: https://github.com/carpedm20/fbchat/tree/master/LICENSE + :alt: License: BSD 3-Clause .. image:: https://readthedocs.org/projects/fbchat/badge/?version=stable :target: https://fbchat.readthedocs.io @@ -26,7 +26,7 @@ :alt: Code style A powerful and efficient library to interact with -`Facebook\'s Messenger `__, using just your email and password. +`Facebook's Messenger `__, using just your email and password. This is *not* an official API, Facebook has that `over here `__ for chat bots. This library differs by using a normal Facebook account instead. @@ -36,15 +36,15 @@ This is *not* an official API, Facebook has that `over here `__. Additionally, you can view the project's progress `here `__. @@ -86,7 +86,7 @@ You can also install directly from source, provided you have ``pip>=19.0``: .. inclusion-marker-installation-end -Example usage +Example Usage ------------- .. code-block:: diff --git a/docs/api/index.rst b/docs/api/index.rst index b29d14d..0cc6ccf 100644 --- a/docs/api/index.rst +++ b/docs/api/index.rst @@ -1,5 +1,4 @@ .. module:: fbchat -.. _api: .. Note: we're using () to hide the __init__ method where relevant diff --git a/docs/conf.py b/docs/conf.py index 500f658..f942d18 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -162,7 +162,7 @@ epub_exclude_files = ["search.html"] # -- Options for autodoc extension --------------------------------------- -autoclass_content = "both" +autoclass_content = "class" autodoc_member_order = "bysource" autodoc_default_options = {"members": True} diff --git a/docs/faq.rst b/docs/faq.rst index af1d643..28183b8 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -6,7 +6,7 @@ The new version broke my application ``fbchat`` follows `Scemantic Versioning `__ quite rigorously! -That means that breaking changes can *only* occur in major versions (e.g. `v1.9.6` -> `v2.0.0`). +That means that breaking changes can *only* occur in major versions (e.g. ``v1.9.6`` -> ``v2.0.0``). If you find that something breaks, and you didn't update to a new major version, then it is a bug, and we would be grateful if you reported it! diff --git a/fbchat/_thread.py b/fbchat/_thread.py index 89cb2bb..0d8a0f0 100644 --- a/fbchat/_thread.py +++ b/fbchat/_thread.py @@ -110,7 +110,7 @@ class ThreadABC(metaclass=abc.ABCMeta): reply_to_id: Optional message to reply to Returns: - :ref:`Message ID ` of the sent message + The sent message """ data = self._to_send_data() data["action_type"] = "ma-type:user-generated-message" @@ -139,7 +139,7 @@ class ThreadABC(metaclass=abc.ABCMeta): size: The size of the emoji Returns: - :ref:`Message ID ` of the sent message + The sent message """ data = self._to_send_data() data["action_type"] = "ma-type:user-generated-message" @@ -154,7 +154,7 @@ class ThreadABC(metaclass=abc.ABCMeta): sticker_id: ID of the sticker to send Returns: - :ref:`Message ID ` of the sent message + The sent message """ data = self._to_send_data() data["action_type"] = "ma-type:user-generated-message"