Skip to content

Improve some typing #2000

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Improve some typing #2000

wants to merge 15 commits into from

Conversation

Yoshanuikabundi
Copy link
Collaborator

@Yoshanuikabundi Yoshanuikabundi commented Jan 23, 2025

This PR includes many changes needed for OpenFF Pablo to type check, and 1 for it to run correctly. Pablo development so far has and will continue to test and type check against this branch (or main once it is merged) until it gets into a release.

  • improves typing as needed by OpenFF Pablo by adding and correcting many type annotations
  • Handle an exception previously raised when Molecule.to_rdkit() is run on a molecule with residue numbers that cannot be converted to int (such as hexadecimal residue numbers used by OpenMM in large PDB files)
  • Makes Molecule.is_isomorphic_with() so that its keyword arguments are actually keyword arguments. This is not a breaking change as the **kwargs argument is still present, it's just ignored - we should deprecate and remove this ASAP
  • Update changelog

Sorry for the behemoth PR!

Copy link

codecov bot commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 97.87234% with 1 line in your changes missing coverage. Please review.

Project coverage is 82.62%. Comparing base (d5d4cf8) to head (e717570).

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mattwthompson
Copy link
Member

Okey - sorry to screw up your PR briefly, I think I've brought it up to date with the non-trivial changes that have been happening upstream. I have some ideas about how we can revamp typing in general, as I'm sure you do, but this is neither the time or the place for me to push that

@Yoshanuikabundi Yoshanuikabundi force-pushed the better_typing branch 2 times, most recently from 7d7f1c8 to 3dc07df Compare July 4, 2025 00:51
@Yoshanuikabundi Yoshanuikabundi marked this pull request as ready for review July 4, 2025 03:33
@Yoshanuikabundi Yoshanuikabundi requested a review from j-wags as a code owner July 4, 2025 03:33
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