Add comprehensive docstrings to all public classes and methods#132
Merged
Add comprehensive docstrings to all public classes and methods#132
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
tasks.py): Added docstrings toBaseTask, 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 examplessync_client.py,async_client.py): Added docstrings toAnticaptchaClient,AsyncAnticaptchaClient,Job, andAsyncJobclasses, plus all public methods (createTask,getTaskResult,getBalance,getAppStats,reportIncorrectImage,reportIncorrectRecaptcha, etc.)get_solution_response,get_token_response,get_captcha_text,get_answers,get_cells_numbers,check_is_ready) and reporting methodsproxy.py,exceptions.py): Added docstrings toProxyclass withparse_url()andto_kwargs()methods, and exception classes (AnticaptchaException,InvalidWidthException,MissingNameException)__init__.py): Added module-level docstring with quick start example and installation instructionsNotable Details
NoCaptchaTaskProxylessTask,AnticaptchaClient, andProxy:class:and:meth:roles for better IDE navigationAnticatpchaExceptiondocumented as legacy misspellinghttps://claude.ai/code/session_012EAJ6fLNGswentS5LFX771