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

Typing: complete and enforce presence of return type annotations for public functions in main module #171

Merged
merged 3 commits into from
Mar 10, 2025

Conversation

elliot-100
Copy link
Collaborator

@elliot-100 elliot-100 commented Feb 13, 2025

Building on #152, this PR:

  • Completes return hints for public functions, methods in the main module and enforces their presence, i.e. new code in the main module must have return types to pass CI. Some of these go along with what docstrings say is returned, not what may actually be returned. But sorting that is one for a different PR.

  • Adds additional return types in tests, but this is still incomplete and not enforced.

It should have zero runtime effect.

Note no actual type checking is enforced yet.

@elliot-100 elliot-100 marked this pull request as draft February 13, 2025 16:24
@elliot-100 elliot-100 force-pushed the type-hints-2 branch 2 times, most recently from 8040fed to 9b9815f Compare February 13, 2025 16:30
@elliot-100 elliot-100 marked this pull request as ready for review March 7, 2025 18:30
Copy link
Owner

@Olen Olen left a comment

Choose a reason for hiding this comment

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

Looks pretty good to me

@elliot-100 elliot-100 merged commit e7ff45a into Olen:main Mar 10, 2025
5 checks passed
@elliot-100 elliot-100 deleted the type-hints-2 branch March 10, 2025 14:27
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