Skip to content

Commit e718d76

Browse files
authored
Fix docs syntax errors (#771)
1 parent 99080e4 commit e718d76

File tree

11 files changed

+28
-23
lines changed

11 files changed

+28
-23
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ before_script:
2929
script:
3030
- pytest --cov-report term-missing --cov=pynamodb tests
3131
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.7" ]]; then mypy .; fi
32+
- sphinx-build -W docs /tmp/docs-build
3233

3334
after_success:
3435
- coveralls

docs/api.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,3 @@ Exceptions
3939
.. autoexception:: pynamodb.exceptions.TableDoesNotExist
4040
.. autoexception:: pynamodb.exceptions.DoesNotExist
4141

42-
Migration API
43-
-------------
44-
45-
.. automodule:: pynamodb.migration
46-
:members:

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
# Add any paths that contain custom static files (such as style sheets) here,
139139
# relative to this directory. They are copied after the builtin static files,
140140
# so a file named "default.css" will overwrite the builtin "default.css".
141-
html_static_path = ['_static']
141+
#html_static_path = ['_static']
142142

143143
# Add any extra paths that contain custom files (such as robots.txt or
144144
# .htaccess) here, relative to this directory. These files are copied

docs/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Topics
3434
conditional
3535
attributes
3636
transaction
37+
optimistic_locking
38+
rate_limited_operations
3739
local
3840
backup_restore
3941
signals

docs/local.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ that your server is listening on.
3434
Running dynalite
3535
^^^^^^^^^^^^^^^^
3636

37-
Make sure you have the Node Package Manager installed, instructions `here <https://www.npmjs.org/doc/README.html>`_.
37+
Make sure you have the Node Package Manager installed (see `npm instructions <https://www.npmjs.org/doc/README.html>`_).
3838

3939
Install dynalite::
4040

@@ -55,7 +55,7 @@ store your data. You can use DynamoDB local with PynamoDB for testing, debugging
5555
For more information, you can read `Amazon's Announcement <http://aws.amazon.com/about-aws/whats-new/2013/09/12/amazon-dynamodb-local/>`_ and
5656
`Jeff Barr's blog post <http://aws.typepad.com/aws/2013/09/dynamodb-local-for-desktop-development.html>`_ about it.
5757

58-
* Download the latest version of DynamoDB local `here <http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest>`_.
58+
* Download the `latest version of DynamoDB local <http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest>`_.
5959
* Unpack the contents of the archive into a directory of your choice.
6060

6161
DynamoDB local requires the `Java Runtime Environment <http://java.com/en/>`_ version 7. Make sure the JRE is installed before continuing.

docs/rate_limited_operations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Rate-Limited Operation
2-
================
2+
======================
33

44
`Scan`, `Query` and `Count` operations can be rate-limited based on the consumed capacities returned from DynamoDB.
55
Simply specify the `rate_limit` argument when calling these methods. Rate limited batch writes are not currently supported,

docs/release_notes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ re-serialize any data that was written with v1.5.4 and below.
453453
Temporary feature in this release:
454454

455455
* Model.fix_unicode_set_attributes() migration helper
456-
# Model.needs_unicode_set_fix() migration helper
456+
* Model.needs_unicode_set_fix() migration helper
457457

458458

459459
v2.1.6

docs/signals.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The callback must taking the following arguments:
2424
Arguments Description
2525
================ ===========
2626
*sender* The object that fired that method.
27-
*operation_name* The string name of the `DynamoDB action`_
27+
*operation_name* The string name of the DynamoDB action
2828
*table_name* The name of the table the operation is called upon.
2929
*req_uuid* A unique identifer so subscribers can correlate the before and after events.
3030
================ ===========

docs/transaction.rst

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Transact Writes
3030

3131
A :py:class:`TransactWrite <pynamodb.transactions.TransactWrite>` can be initialized with the following parameters:
3232

33-
* ``connection`` (required) - the :py:class:`Connection <pynamodb.connection.base.Connection>` used to make the request (see :ref:`low_level`)
33+
* ``connection`` (required) - the :py:class:`Connection <pynamodb.connection.base.Connection>` used to make the request (see :ref:`low-level`)
3434
* ``client_request_token`` - an idempotency key for the request (see `ClientRequestToken <https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactWriteItems.html#DDB-TransactWriteItems-request-ClientRequestToken>`_ in the DynamoDB API reference)
3535
* ``return_consumed_capacity`` - determines the level of detail about provisioned throughput consumption that is returned in the response (see `ReturnConsumedCapacity <https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactWriteItems.html#DDB-TransactWriteItems-request-ReturnConsumedCapacity>`_ in the DynamoDB API reference)
3636
* ``return_item_collection_metrics`` - determines whether item collection metrics are returned (see `ReturnItemCollectionMetrics <https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactWriteItems.html#DDB-TransactWriteItems-request-ReturnItemCollectionMetrics>`_ in the DynamoDB API reference)
@@ -118,12 +118,12 @@ Condition Check
118118

119119
The ``ConditionCheck`` operation is used on a :py:class:`TransactWrite <pynamodb.transactions.TransactWrite>` to check if the current state of a record you
120120
aren't modifying within the overall transaction fits some criteria that, if it fails, would cause the entire
121-
transaction to fail. The ``condition`` argument is of type :ref:`conditional`.
121+
transaction to fail. The ``condition`` argument is of type :ref:`conditional_operations`.
122122

123123
* ``model_cls`` (required)
124124
* ``hash_key`` (required)
125125
* ``range_key`` (optional)
126-
* ``condition`` (required) - of type :py:class:`Condition <pynamodb.expressions.condition.Condition>` (see :ref:`conditional`)
126+
* ``condition`` (required) - of type :py:class:`Condition <pynamodb.expressions.condition.Condition>` (see :ref:`conditional_operations`)
127127

128128
.. code-block:: python
129129
@@ -137,7 +137,7 @@ Delete
137137
The ``Delete`` operation functions similarly to ``Model.delete``.
138138

139139
* ``model`` (required)
140-
* ``condition`` (optional) - of type :py:class:`Condition <pynamodb.expressions.condition.Condition>` (see :ref:`conditional`)
140+
* ``condition`` (optional) - of type :py:class:`Condition <pynamodb.expressions.condition.Condition>` (see :ref:`conditional_operations`)
141141

142142
.. code-block:: python
143143
@@ -154,8 +154,8 @@ Save
154154
The ``Put`` operation functions similarly to ``Model.save``.
155155

156156
* ``model`` (required)
157-
* ``condition`` (optional) - of type :py:class:`Condition <pynamodb.expressions.condition.Condition>` (see :ref:`conditional`)
158-
* ``return_values`` (optional) - the values that should be returned if the condition fails ((see `ReturnValuesOnConditionCheckFailure <https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Put.html#DDB-Type-Put-ReturnValuesOnConditionCheckFailure>`_ in the DynamoDB API reference)
157+
* ``condition`` (optional) - of type :py:class:`Condition <pynamodb.expressions.condition.Condition>` (see :ref:`conditional_operations`)
158+
* ``return_values`` (optional) - the values that should be returned if the condition fails ((see `Put ReturnValuesOnConditionCheckFailure`_ in the DynamoDB API reference)
159159

160160
.. code-block:: python
161161
@@ -172,8 +172,8 @@ The ``Update`` operation functions similarly to ``Model.update``.
172172

173173
* ``model`` (required)
174174
* ``actions`` (required) - a list of type :py:class:`Action <pynamodb.expressions.update.Action>` (see :ref:`updates`)
175-
* ``condition`` (optional) - of type :py:class:`Condition <pynamodb.expressions.condition.Condition>` (see :ref:`conditional`)
176-
* ``return_values`` (optional) - the values that should be returned if the condition fails (see `ReturnValuesOnConditionCheckFailure <https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Update.html#DDB-Type-Update-ReturnValuesOnConditionCheckFailure>`_ in the DynamoDB API reference)
175+
* ``condition`` (optional) - of type :py:class:`Condition <pynamodb.expressions.condition.Condition>` (see :ref:`conditional_operations`)
176+
* ``return_values`` (optional) - the values that should be returned if the condition fails (see `Update ReturnValuesOnConditionCheckFailure`_ in the DynamoDB API reference)
177177

178178

179179
.. code-block:: python
@@ -215,6 +215,11 @@ Error Types
215215

216216
You can expect some new error types with transactions, such as:
217217

218-
* :py:exc:`TransactWriteError <pynamodb.exceptions.TransactWriteError>` - thrown when a :py:class:`TransactWrite <pynamodb.transactions.TransactWrite>` request returns a bad response (see the `Errors <https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactWriteItems.html#API_TransactWriteItems_Errors>`_ section in the DynamoDB API reference).
219-
* :py:exc:`TransactGetError <pynamodb.exceptions.TransactGetError>` - thrown when a :py:class:`TransactGet <pynamodb.transactions.TransactGet>` request returns a bad response (see the `Errors <https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactGetItems.html#API_TransactGetItems_Errors>`_ section in the DynamoDB API reference).
218+
* :py:exc:`TransactWriteError <pynamodb.exceptions.TransactWriteError>` - thrown when a :py:class:`TransactWrite <pynamodb.transactions.TransactWrite>` request returns a bad response (see the `TransactWriteItems Errors`_ section in the DynamoDB API reference).
219+
* :py:exc:`TransactGetError <pynamodb.exceptions.TransactGetError>` - thrown when a :py:class:`TransactGet <pynamodb.transactions.TransactGet>` request returns a bad response (see the `TransactGetItems Errors`_ section in the DynamoDB API reference).
220220
* :py:exc:`InvalidStateError <pynamodb.exceptions.InvalidStateError>` - thrown when an attempt is made to access data on a :py:class:`_ModelFuture <pynamodb.models._ModelFuture>` before the `TransactGet` request is completed.
221+
222+
.. _Update ReturnValuesOnConditionCheckFailure: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Update.html#DDB-Type-Update-ReturnValuesOnConditionCheckFailure>
223+
.. _Put ReturnValuesOnConditionCheckFailure: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Put.html#DDB-Type-Put-ReturnValuesOnConditionCheckFailure
224+
.. _TransactWriteItems Errors: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactWriteItems.html#API_TransactWriteItems_Errors
225+
.. _TransactGetItems Errors: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactGetItems.html#API_TransactGetItems_Errors

pynamodb/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,8 @@ def get(cls,
476476
477477
:param hash_key: The hash key of the desired item
478478
:param range_key: The range key of the desired item, only used when appropriate.
479-
:param consistent_read
480-
:param attributes_to_get
479+
:param consistent_read:
480+
:param attributes_to_get:
481481
:raises ModelInstance.DoesNotExist: if the object to be updated does not exist
482482
"""
483483
hash_key, range_key = cls._serialize_keys(hash_key, range_key)

0 commit comments

Comments
 (0)