Format code, Typehint & Overload Functions, add new docstrings, fix documentation & spelling mistakes #255
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.
I had the idea of making this library more in line with how aiodns works and this will also keep this library up to date with planned changes I have for cyares in a future update. The main features with this pull request the following.
To help users when calling
help(...)or when using pyright in vs-code or another code editor of someone else's choosing. The main reason was to keep the code up to date and would look the same as some of the newer portions of code. I did not however document or type hint portions of code that are currently off limits to the end user but maybe at a later time I will do that unless otherwise.Better callback help such as overloads. The only one caveat was that I had to sacrifice for Literal numbers so that this would work correctly but luckily c-ares has predefined macros for help with that so it wasn't that big of a problem, I got my inspiration for this thanks to aiodns's setup for type hinting
pycares.AresResult,Types as well as my own library which attempts to also do the same.Documentation that was originally documented was what I used as a baseplate to help me figure out and write out everything else that was previously documented in the docs folder or readthedocs. Feel free to let me know if any of this needs fixing or better care.
I also formatted the code using ruff to ensure that the code looked up to date and genuine as well as readable to maintainers and other users.
The last thing I did was make sure that the 2 functions I added previously to this library had been documented in the readthedocs so that It would not be left out.