Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python type annotation #284

Merged
merged 1 commit into from
Feb 15, 2022
Merged

Conversation

jborean93
Copy link
Contributor

@jborean93 jborean93 commented Feb 7, 2022

Adds type annotations to the library for better type analysis and IDE integration with this library. Currently the gssapi.raw contents have been annotated with .pyi files. Using a separate file is quite useful for C extensions as an IDE can easily inspect what functions are meant to be available, their types, and doc strings without having the extension actually compiled and installed. Because of this all the docstrings have been moved out of the Cython pyx files into their respective pyi files. The Sphinx doc generator has also been updated to support this.

The next step is to annotate the high level gssapi package and enable some mypy tests for CI to ensure this library is valid. - done

Signed-off-by: Jordan Borean jborean93@gmail.com

@jborean93 jborean93 force-pushed the type-annotation branch 2 times, most recently from fbd623c to 2cc6416 Compare February 8, 2022 02:51
@jborean93 jborean93 marked this pull request as ready for review February 8, 2022 02:54
Signed-off-by: Jordan Borean <jborean93@gmail.com>
@simo5
Copy link
Contributor

simo5 commented Feb 15, 2022

LGTM

Copy link
Contributor

@simo5 simo5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a mess of a change, but also very beneficial, I'll steal this stuff.

@jborean93 jborean93 merged commit 935f95a into pythongssapi:main Feb 15, 2022
@jborean93 jborean93 deleted the type-annotation branch February 15, 2022 20:06
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