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

Improper color type for certain methods #1405

Closed
pbk0 opened this issue Nov 7, 2021 · 2 comments
Closed

Improper color type for certain methods #1405

pbk0 opened this issue Nov 7, 2021 · 2 comments
Labels
state: ready Fixed/Added and will be present in an upcoming release type: bug bug

Comments

@pbk0
Copy link
Contributor

pbk0 commented Nov 7, 2021

Version of Dear PyGui

Version: 1.0.2
Operating System: Win 11

My Issue/Question

I am writing an auto parser which converts dpg code to python dataclasses. More on it here ...
While doing so, I am able to find some inconsistencies in dpg code.
I can highlight more in future but for now please check this.

  • methods dpg.add_file_extension and dpg.add_text

    • color : Union[List[float], Tuple[float, ...]] > color : Union[List[int], Tuple[int, ...]]
  • method dpg.add_colormap

    • colors : List[List[int]] > colors : List[Union[List[int], Tuple[int, ...]]]

Note that everywhere in dpg the color type is Union[List[int], Tuple[int, ...]] so this will make things consistent.

@pbk0 pbk0 added state: pending not addressed yet type: bug bug labels Nov 7, 2021
@hoffstadt hoffstadt removed the state: pending not addressed yet label Nov 8, 2021
@hoffstadt
Copy link
Owner

Will do!

@pbk0
Copy link
Contributor Author

pbk0 commented Nov 8, 2021

Also this change is needed for method dpg.add_colormap for kwarg colors

  • colors : List[List[int]] > colors : List[Union[List[int], Tuple[int, ...]]]

These changes are minor and I could have generated PR. But I think you need to code the parser which auto generates this method. So I hope that my suggestions are not irritating ;)

@hoffstadt hoffstadt added the state: ready Fixed/Added and will be present in an upcoming release label Nov 11, 2021
hoffstadt added a commit that referenced this issue Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: ready Fixed/Added and will be present in an upcoming release type: bug bug
Projects
None yet
Development

No branches or pull requests

2 participants