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 type hints #727

Open
dyollb opened this issue Nov 9, 2024 · 0 comments
Open

Add type hints #727

dyollb opened this issue Nov 9, 2024 · 0 comments
Labels
feature request Request for new features

Comments

@dyollb
Copy link
Contributor

dyollb commented Nov 9, 2024

Is your feature request related to a problem? Please describe.
ANTsPy currently doesn't use type hints.

  • type hints help users understand what type of parameters are expected.
  • type hints can be used by static type checkers to detect potential bugs, e.g. when you change a signature

Describe the solution you'd like

  • I would offer to add type hints in most functions
  • add an action to run mypy in the CI to ensure type hints are added and are still accurate

Describe alternatives you've considered
Do nothing. Rely on pyright to guess the expected return types, and parameters (when there are defaults)

Additional context
na

@cookpa cookpa added the feature request Request for new features label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for new features
Projects
None yet
Development

No branches or pull requests

2 participants