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

dataType in attribute description seems to be misleading #28

Open
Haifischbecken opened this issue Apr 10, 2024 · 4 comments
Open

dataType in attribute description seems to be misleading #28

Haifischbecken opened this issue Apr 10, 2024 · 4 comments
Assignees

Comments

@Haifischbecken
Copy link
Contributor

Haifischbecken commented Apr 10, 2024

Context

When running the generation for a class the templater is fed with the class_details dictonary. Within there is a list of attributes (class_details["attributes"}]`) that describe the attributes. This attribute description contains a key dataType.

Problem

The value of this key seems to be inconsitent or the name might be missleading, as for primitives (Integer, Boolean etc.) it does contain the type but for complex types it contains the muliplicity (e.g. M:0..n) for some reason.
This seems to be either:

  1. a bug (if muliplicity should never be there) or
  2. misleading naming (if it is correct that the multiplicity shows up here).

Either way the contained information is available from other values class_name and multiplicity respectively which both seem to be more consitent and should likely be used instead.

Scope

Other than the generation of a comment in the cpp generation the value from dataType is thus far only used in the modern_python langPack.

@Haifischbecken
Copy link
Contributor Author

@m-mirz Can you maybe say something about whether this is a bug or a naming issue?

@Haifischbecken
Copy link
Contributor Author

I'll have a look at fixing this for modern_python.

@Haifischbecken Haifischbecken self-assigned this Apr 10, 2024
@m-mirz
Copy link
Contributor

m-mirz commented Apr 11, 2024

@Haifischbecken I am not really sure but I don’t think that it was intentionally done this way. I think it is a good idea to check and potentially change this.

@Haifischbecken
Copy link
Contributor Author

@m-mirz Ok, great. As I said the same info is available via other attributes and it is basically unused as of now, so we can probably just remove it to avoid confusion.

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

No branches or pull requests

2 participants