Skip to content

Conversation

MarcoGorelli
Copy link

closes #166

Stubs are taken from: https://github.com/python/typeshed/tree/main/stubs/olefile/olefile

Other changes:

  • I used sys.version_info to do Python2 vs Python3 branching, then MyPy doesn't require extra type: ignores (it's also probably more robust?)
  • I added a CI workflow which runs stubtest and mypy to check that the stubs remain valid, and that no extra nor extraneous symbols appear

Advantages of having the type stubs inlined are:

  • when people pip install olefile, they get the stubs automatically
  • it becomes easier to keep the stubs up-to-date

@MarcoGorelli MarcoGorelli marked this pull request as ready for review June 17, 2025 13:58
@decalage2 decalage2 self-requested a review June 18, 2025 08:09
@decalage2 decalage2 self-assigned this Jun 18, 2025
@decalage2 decalage2 added this to the olefile 0.50 milestone Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type hints
2 participants