Skip to content

Comments

Add mypy type stubs and configuration for cyprecice module #2#252

Open
AdityaGupta716 wants to merge 2 commits intoprecice:developfrom
AdityaGupta716:add-mypy-type-hints
Open

Add mypy type stubs and configuration for cyprecice module #2#252
AdityaGupta716 wants to merge 2 commits intoprecice:developfrom
AdityaGupta716:add-mypy-type-hints

Conversation

@AdityaGupta716
Copy link
Contributor

Closes #2

Added mypy support for the cyprecice Python bindings:

  • cyprecice/cyprecice.pyi - type stubs for all Participant methods
  • cyprecice/__init__.pyi - stub entry point for mypy module resolution
  • cyprecice/py.typed - PEP 561 marker indicating typing support
  • mypy.ini - mypy configuration

Running mypy precice/ passes with no errors.

Notes:

  • get_version_information() return type verified as bytes from existing tests
  • communicator parameter typed as Optional[Any] as mpi4py type is not always available

@AdityaGupta716
Copy link
Contributor Author

@IshaanDesai plz review

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.

Use type hints and mypy in python bindings

1 participant