adding docstrings to the module functions, classes, class methods, and class properties
adding missing parameters to various methods that didn't have them before
making corrections to a few function signatures
setting class properties correctly with @property (specifically r/o or r/w)
The docstrings are in Google format, although I should say I haven't stuck rigidly to that guide.
The docstrings I've added don't attempt to provide a full description for every function. The behavior of many functions is complex and I believe the Wiki is still the best place to provide comprehensive documentation. My intention is to enhance the experience for developers by adding more summary info to the popups often seen in PyCharm, VSCode, etc.
I'm aware that List[] and Dict[] can generally be used in their base form (list[] and dict[]) but I stuck with List[] and Dict[] in this PR for consistency. Ditto for Optional and | None.
This PR does make use of the relatively new typing.TypeAlias annotation which is available only in 3.10+ (also typing.Final from 3.8). I don't think this should be an issue because this shouldn't affect running code and linters should probably be using the latest version of Python anyway, but if anybody thinks this is problematic, let me know.
Also, the build is failing for Python 3.6 because Github Action's runner ubuntu-latest was recently upgraded from 20.04 to 22.04, and 22.04 is not available for Python 3.6 in Github Actions. (Another reason for dropping 2.7/3.6.)
This PR enhances the existing
pyodbc.pyi
file by:@property
(specifically r/o or r/w)The docstrings are in Google format, although I should say I haven't stuck rigidly to that guide.
The docstrings I've added don't attempt to provide a full description for every function. The behavior of many functions is complex and I believe the Wiki is still the best place to provide comprehensive documentation. My intention is to enhance the experience for developers by adding more summary info to the popups often seen in PyCharm, VSCode, etc.
I'm aware that
List[]
andDict[]
can generally be used in their base form (list[]
anddict[]
) but I stuck withList[]
andDict[]
in this PR for consistency. Ditto forOptional
and| None
.This PR does make use of the relatively new
typing.TypeAlias
annotation which is available only in 3.10+ (alsotyping.Final
from 3.8). I don't think this should be an issue because this shouldn't affect running code and linters should probably be using the latest version of Python anyway, but if anybody thinks this is problematic, let me know.Also, the build is failing for Python 3.6 because Github Action's runner
ubuntu-latest
was recently upgraded from 20.04 to 22.04, and 22.04 is not available for Python 3.6 in Github Actions. (Another reason for dropping 2.7/3.6.)