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

rfctr: add type annotations #992

Merged
merged 5 commits into from
Aug 3, 2024
Merged

rfctr: add type annotations #992

merged 5 commits into from
Aug 3, 2024

Conversation

scanny
Copy link
Owner

@scanny scanny commented Aug 1, 2024

Summary
Add many type annotations. Focus is on more-used API objects, it will take a few passes to drive these all the way down.

Also:

  • Move source code to /src/pptx/
  • Add type-stubs for the parts of lxml we use.
  • Change line-length to 100.
  • Modernize enumerations to remove the custom classes and metaclasses used before.
  • Modernize build process somewhat.

This improves packaging reliability because it prevents tests from
running against the current directory instead of the installed version
of the package.
@scanny scanny force-pushed the scanny/add-type-annotations branch 4 times, most recently from c6a49f3 to ceb8472 Compare August 2, 2024 00:45
- Add `pyproject.toml` and gather configuration there. Move `.ruff.toml`
  contents into `pyproject.toml`.
- Add `requirements-test.txt`.
@scanny scanny force-pushed the scanny/add-type-annotations branch 4 times, most recently from ac2b1bc to a437950 Compare August 3, 2024 03:19
Add type-annotations broadly, but prioritizing interface objects and
methods. Adjust text-width to 100, remove Python 2 support, etc.
@scanny scanny force-pushed the scanny/add-type-annotations branch from a437950 to f39394b Compare August 3, 2024 03:50
@scanny scanny merged commit c38d5f5 into master Aug 3, 2024
4 checks passed
@scanny scanny deleted the scanny/add-type-annotations branch August 3, 2024 03:53
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.

1 participant