Skip to content

Fix typing in SdoTermSource#3662

Merged
alex-jansen merged 11 commits intomainfrom
sdo_term_source_types
Oct 8, 2024
Merged

Fix typing in SdoTermSource#3662
alex-jansen merged 11 commits intomainfrom
sdo_term_source_types

Conversation

@MatthiasWiesmann
Copy link
Contributor

@MatthiasWiesmann MatthiasWiesmann commented Oct 3, 2024

Added typing and structure to SdoTermSource.

The various fields of SdoTerm contain either identifiers (as strings), or instances of SdoTerm and the code hacks around this with a lot of obscure casting operations. Replaced the content with an object than contains either, or a sequence which contains either. This makes it possible to at least document the types that are taken by various methods. This also enables, making the code smarter, as most of the current functions systematically assume the worst.

  • Added holding structures.
  • Added unit-tests for these structures.
  • Updated all the code that access theses fields, including the Jinga templates.
  • Added typing information in many places.
  • Removed test that was broken but shadowed by another test with the same name (thanks python).
  • Added documentation where I figured out what is going on.
  • Added some assertions on types in critical entry points.

@MatthiasWiesmann MatthiasWiesmann changed the title Do not review Fix typing in SdoTermSource Oct 4, 2024
@alex-jansen alex-jansen merged commit 355a4c8 into main Oct 8, 2024
@alex-jansen alex-jansen deleted the sdo_term_source_types branch October 8, 2024 12:00
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.

4 participants