Skip to content

Add comprehensive docstrings to all public classes and methods#132

Merged
ad-m merged 2 commits intomasterfrom
claude/modernize-library-plan-96if9
Mar 8, 2026
Merged

Add comprehensive docstrings to all public classes and methods#132
ad-m merged 2 commits intomasterfrom
claude/modernize-library-plan-96if9

Conversation

@ad-m
Copy link
Owner

@ad-m ad-m commented Mar 8, 2026

Summary

This PR adds comprehensive docstrings to all public classes and methods across the python-anticaptcha library, improving code documentation and IDE support. All docstrings follow Google/NumPy style conventions with parameter descriptions, return types, and usage examples where appropriate.

Key Changes

  • Task classes (tasks.py): Added docstrings to BaseTask, all mixin classes (UserAgentMixin, CookieMixin, ProxyMixin), and all task type classes (ReCAPTCHA v2/v3, hCaptcha, FunCaptcha, GeeTest, ImageToText, AntiGate, etc.) with parameter descriptions and usage examples
  • Client classes (sync_client.py, async_client.py): Added docstrings to AnticaptchaClient, AsyncAnticaptchaClient, Job, and AsyncJob classes, plus all public methods (createTask, getTaskResult, getBalance, getAppStats, reportIncorrectImage, reportIncorrectRecaptcha, etc.)
  • Job/AsyncJob methods: Added docstrings to solution retrieval methods (get_solution_response, get_token_response, get_captcha_text, get_answers, get_cells_numbers, check_is_ready) and reporting methods
  • Utility classes (proxy.py, exceptions.py): Added docstrings to Proxy class with parse_url() and to_kwargs() methods, and exception classes (AnticaptchaException, InvalidWidthException, MissingNameException)
  • Package docstring (__init__.py): Added module-level docstring with quick start example and installation instructions

Notable Details

  • All docstrings include parameter descriptions with type hints and return value documentation
  • Usage examples provided for commonly-used classes like NoCaptchaTaskProxylessTask, AnticaptchaClient, and Proxy
  • Cross-references between related classes using Sphinx-style :class: and :meth: roles for better IDE navigation
  • Backward-compatible alias AnticatpchaException documented as legacy misspelling
  • No functional code changes — this is purely documentation enhancement

https://claude.ai/code/session_012EAJ6fLNGswentS5LFX771

claude added 2 commits March 7, 2026 21:21
Improve IDE experience (hover tooltips, autocomplete descriptions, help())
by adding RST-format docstrings to every public class and method across the
library: task classes, sync/async clients, Job/AsyncJob, Proxy, and exceptions.
Includes usage examples, parameter descriptions, and cross-references.

https://claude.ai/code/session_012EAJ6fLNGswentS5LFX771
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
@ad-m ad-m merged commit a4cc29e into master Mar 8, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants