Skip to content

Commit bc70597

Browse files
Copilotjason810496
andauthored
Fix duplicate reStructuredText substitution definitions in docstrings (#46)
* Initial plan * Fix duplicate substitution definitions in docstrings Co-authored-by: jason810496 <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jason810496 <[email protected]>
1 parent d0c01d5 commit bc70597

1 file changed

Lines changed: 0 additions & 38 deletions

File tree

pgmq_sqlalchemy/queue.py

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,6 @@ async def create_queue_async(
198198
commit: bool = True,
199199
) -> None:
200200
"""
201-
.. _unlogged_table: https://www.postgresql.org/docs/current/sql-createtable.html#SQL-CREATETABLE-UNLOGGED
202-
.. |unlogged_table| replace:: **UNLOGGED TABLE**
203-
204201
**Create a new queue.**
205202
206203
* if ``unlogged`` is ``True``, the queue will be created as an |unlogged_table|_ .
@@ -287,9 +284,6 @@ async def create_partitioned_queue_async(
287284
) -> None:
288285
"""Create a new **partitioned** queue.
289286
290-
.. _pgmq_partitioned_queue: https://github.com/tembo-io/pgmq?tab=readme-ov-file#partitioned-queues
291-
.. |pgmq_partitioned_queue| replace:: **PGMQ: Partitioned Queues**
292-
293287
.. code-block:: python
294288
295289
# Numeric partitioning (by msg_id)
@@ -414,9 +408,6 @@ async def drop_queue_async(
414408
) -> bool:
415409
"""Drop a queue.
416410
417-
.. _drop_queue_method: ref:`pgmq_sqlalchemy.PGMQueue.drop_queue`
418-
.. |drop_queue_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.drop_queue`
419-
420411
.. code-block:: python
421412
422413
await pgmq_client.drop_queue_async('my_queue')
@@ -700,12 +691,6 @@ async def read_async(
700691
commit: bool = True,
701692
) -> Optional[Message]:
702693
"""
703-
.. _for_update_skip_locked: https://www.postgresql.org/docs/current/sql-select.html#SQL-FOR-UPDATE-SHARE
704-
.. |for_update_skip_locked| replace:: **FOR UPDATE SKIP LOCKED**
705-
706-
.. _read_method: ref:`pgmq_sqlalchemy.PGMQueue.read`
707-
.. |read_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.read`
708-
709694
Read a message from the queue.
710695
711696
Returns:
@@ -929,10 +914,6 @@ async def read_with_poll_async(
929914
) -> Optional[List[Message]]:
930915
"""
931916
932-
.. _read_with_poll_method: ref:`pgmq_sqlalchemy.PGMQueue.read_with_poll`
933-
.. |read_with_poll_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.read_with_poll`
934-
935-
936917
| Read messages from a queue with long-polling.
937918
|
938919
| When the queue is empty, the function block at most ``max_poll_seconds`` seconds.
@@ -1074,9 +1055,6 @@ async def set_vt_async(
10741055
commit: bool = True,
10751056
) -> Optional[Message]:
10761057
"""
1077-
.. _set_vt_method: ref:`pgmq_sqlalchemy.PGMQueue.set_vt`
1078-
.. |set_vt_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.set_vt`
1079-
10801058
Set the visibility timeout for a message.
10811059
10821060
Args:
@@ -1231,9 +1209,6 @@ async def delete_async(
12311209
"""
12321210
Delete a message from the queue.
12331211
1234-
.. _delete_method: ref:`pgmq_sqlalchemy.PGMQueue.delete`
1235-
.. |delete_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.delete`
1236-
12371212
* Raises an error if the ``queue_name`` does not exist.
12381213
* Returns ``True`` if the message is deleted successfully.
12391214
* If the message does not exist, returns ``False``.
@@ -1296,9 +1271,6 @@ async def delete_batch_async(
12961271
"""
12971272
Delete a batch of messages from the queue.
12981273
1299-
.. _delete_batch_method: ref:`pgmq_sqlalchemy.PGMQueue.delete_batch`
1300-
.. |delete_batch_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.delete_batch`
1301-
13021274
.. note::
13031275
| Instead of return `bool` like |delete_method|_,
13041276
| |delete_batch_method|_ will return a list of ``msg_id`` that are successfully deleted.
@@ -1364,10 +1336,6 @@ async def archive_async(
13641336
"""
13651337
Archive a message from a queue.
13661338
1367-
.. _archive_method: ref:`pgmq_sqlalchemy.PGMQueue.archive`
1368-
.. |archive_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.archive`
1369-
1370-
13711339
* Message will be deleted from the queue and moved to the archive table.
13721340
* Will be deleted from ``pgmq.q_<queue_name>`` and be inserted into the ``pgmq.a_<queue_name>`` table.
13731341
* raises an error if the ``queue_name`` does not exist.
@@ -1614,12 +1582,6 @@ async def metrics_all_async(
16141582
) -> Optional[List[QueueMetrics]]:
16151583
"""
16161584
1617-
.. _read_committed_isolation_level: https://www.postgresql.org/docs/current/transaction-iso.html#XACT-READ-COMMITTED
1618-
.. |read_committed_isolation_level| replace:: **READ COMMITTED**
1619-
1620-
.. _metrics_all_method: ref:`pgmq_sqlalchemy.PGMQueue.metrics_all`
1621-
.. |metrics_all_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.metrics_all`
1622-
16231585
Get metrics for all queues.
16241586
16251587
Returns:

0 commit comments

Comments
 (0)