Skip to content

Conversation

@Aidavdw
Copy link

@Aidavdw Aidavdw commented Jun 26, 2025

Purpose

Fixes #58 by adding .pyi files for XDSM

Expected time until merged

Should be relatively trivial, as it's a single file. Not really that urgent.

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

Technically a feature? Technically documentation? Whatever, type checking!

Testing

Check if pyright and MyPy correctly load and interpret the .pyi file.
I have already tested this on my local machine.

Checklist

  • I have run flake8 and black to make sure the Python code adheres to PEP-8 and is consistently formatted
  • I have formatted the Fortran code with fprettify or C/C++ code with clang-format as applicable
  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

@Aidavdw Aidavdw requested a review from a team as a code owner June 26, 2025 14:00
@Aidavdw Aidavdw requested a review from A-CGray June 26, 2025 14:00
@A-CGray
Copy link
Member

A-CGray commented Jul 2, 2025

Thanks @Aidavdw , docs build failure should be fixed by mdolab/sphinx_mdolab_theme#17

Could you provide some sort of MWE that demonstrates your stubs working that I can run myself?

@Aidavdw
Copy link
Author

Aidavdw commented Jul 3, 2025

As this is more of an editor-specific thing, I'm not quite sure what constitutes an MWE. Could you elaborate?
Do you want me to give you a small configuration & setup for an editor that uses e.g. pyright to show that it shows up correctly, or do you want a small file using the library where using the stubs correctly resolves the issues pyright brings up without them?

@A-CGray
Copy link
Member

A-CGray commented Jul 3, 2025

Yeah I just mean could you provide a small pyXDSM example that uses type annotations that I can test in my own editor

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.

Stubs for use with python type checker

2 participants