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

Accept different YAML types for image(s) #416

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kvid
Copy link
Collaborator

@kvid kvid commented Jul 24, 2024

  • Accept a single string - fixes [feature] Accept a single string as image value #292
  • Accept a list of images - fixes Several pictures for one connector ? #407
  • Accept no image (as today) - also consider empty string/list as none
  • Accept dict (as today)
  • Raise TypeError for unexpected input types
  • TODO: The current implementation of resolving image paths would require checking all the different input types twice: 1) in the parse() function to find and resolve the paths (not yet fully implemented), and 2) in Image.create() to create the instance(s). How can this be simplified by e.g. forwarding the context (with image path list) to Image.create() to avoid duplicating all the type testing?
  • TODO: This PR is currently based on master to simplify testing the concept, but will later be rebased onto dev and the single commit about HTML generation adapted to Large scale refactoring #251.

kvid added 2 commits July 20, 2024 10:53
Allowing str and list input types in addition to None and dict.
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.

Several pictures for one connector ? [feature] Accept a single string as image value
1 participant