Skip to content

Commit 55cad9e

Browse files
committed
Add Sphinx doc-comments for snake_case aliases
The snake_case method aliases (create_task, get_balance, etc.) were invisible in Sphinx-generated docs because bare attribute assignments are not picked up by autodoc without documentation. Adding #: comments makes them appear with cross-references to the original camelCase methods. https://claude.ai/code/session_012EAJ6fLNGswentS5LFX771
1 parent 992f01a commit 55cad9e

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

python_anticaptcha/async_client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,15 @@ async def reportIncorrectRecaptcha(self, task_id: int) -> bool:
350350
return response["status"] == "success"
351351

352352
# Snake_case aliases
353+
#: Alias for :meth:`createTask`.
353354
create_task = createTask
355+
#: Alias for :meth:`getTaskResult`.
354356
get_task_result = getTaskResult
357+
#: Alias for :meth:`getBalance`.
355358
get_balance = getBalance
359+
#: Alias for :meth:`getAppStats`.
356360
get_app_stats = getAppStats
361+
#: Alias for :meth:`reportIncorrectImage`.
357362
report_incorrect_image = reportIncorrectImage
363+
#: Alias for :meth:`reportIncorrectRecaptcha`.
358364
report_incorrect_recaptcha = reportIncorrectRecaptcha

python_anticaptcha/sync_client.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,17 @@ def reportIncorrectRecaptcha(self, task_id: int) -> bool:
386386
return response["status"] == "success"
387387

388388
# Snake_case aliases
389+
#: Alias for :meth:`createTask`.
389390
create_task = createTask
391+
#: Alias for :meth:`createTaskSmee`.
390392
create_task_smee = createTaskSmee
393+
#: Alias for :meth:`getTaskResult`.
391394
get_task_result = getTaskResult
395+
#: Alias for :meth:`getBalance`.
392396
get_balance = getBalance
397+
#: Alias for :meth:`getAppStats`.
393398
get_app_stats = getAppStats
399+
#: Alias for :meth:`reportIncorrectImage`.
394400
report_incorrect_image = reportIncorrectImage
401+
#: Alias for :meth:`reportIncorrectRecaptcha`.
395402
report_incorrect_recaptcha = reportIncorrectRecaptcha

0 commit comments

Comments
 (0)