Enable strict/explicit code highlighting
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
.. currentmodule:: fbchat
|
||||
.. highlight:: python
|
||||
.. module:: fbchat
|
||||
.. _api:
|
||||
|
||||
.. Note: we're using () to hide the __init__ method where relevant
|
||||
|
11
docs/conf.py
11
docs/conf.py
@@ -54,12 +54,7 @@ master_doc = "index"
|
||||
# This pattern also affects html_static_path and html_extra_path.
|
||||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
||||
|
||||
rst_prolog = """
|
||||
.. highlight:: python
|
||||
.. currentmodule:: {}
|
||||
""".format(
|
||||
project
|
||||
)
|
||||
rst_prolog = ".. currentmodule:: " + project
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all
|
||||
# documents.
|
||||
@@ -70,6 +65,10 @@ default_role = "any"
|
||||
#
|
||||
nitpicky = True
|
||||
|
||||
# Prefer strict Python highlighting
|
||||
#
|
||||
highlight_language = "python3"
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#
|
||||
add_function_parentheses = False
|
||||
|
@@ -1,4 +1,3 @@
|
||||
.. highlight:: sh
|
||||
.. _install:
|
||||
|
||||
Installation
|
||||
@@ -7,7 +6,9 @@ Installation
|
||||
Pip Install fbchat
|
||||
------------------
|
||||
|
||||
To install fbchat, run this command::
|
||||
To install fbchat, run this command:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
$ pip install fbchat
|
||||
|
||||
@@ -21,16 +22,22 @@ Get the Source Code
|
||||
fbchat is developed on GitHub, where the code is
|
||||
`always available <https://github.com/carpedm20/fbchat>`_.
|
||||
|
||||
You can either clone the public repository::
|
||||
You can either clone the public repository:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
$ git clone git://github.com/carpedm20/fbchat.git
|
||||
|
||||
Or, download a `tarball <https://github.com/carpedm20/fbchat/tarball/master>`_::
|
||||
Or, download a `tarball <https://github.com/carpedm20/fbchat/tarball/master>`_:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
$ curl -OL https://github.com/carpedm20/fbchat/tarball/master
|
||||
# optionally, zipball is also available (for Windows users).
|
||||
|
||||
Once you have a copy of the source, you can embed it in your own Python
|
||||
package, or install it into your site-packages easily::
|
||||
package, or install it into your site-packages easily:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
$ python setup.py install
|
||||
|
@@ -1,4 +1,3 @@
|
||||
.. highlight:: sh
|
||||
.. _testing:
|
||||
|
||||
Testing
|
||||
@@ -14,7 +13,9 @@ To use the tests, copy ``tests/data.json`` to ``tests/my_data.json`` or type the
|
||||
Please remember to test all supported python versions.
|
||||
If you've made any changes to the 2FA functionality, test it with a 2FA enabled account.
|
||||
|
||||
If you only want to execute specific tests, pass the function names in the command line (not including the ``test_`` prefix). Example::
|
||||
If you only want to execute specific tests, pass the function names in the command line (not including the ``test_`` prefix). Example:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
$ python tests.py sendMessage sessions sendEmoji
|
||||
|
||||
|
Reference in New Issue
Block a user