Skip to content

Conversation

@Ktakuya332C
Copy link
Contributor

#252 enhanced load_jinja2_template to accept either a file path or raw text as input. The updated function first checks if the provided string corresponds to an existing file. If a file exists at that path, its content is used as the template; otherwise, the input string itself is treated as the template.

However, when the input is a long raw template string (exceeding file name length limits), attempting to validate the path via path.exists() could trigger an OSError. To address this, this PR introduces a try-except block to bypass such errors, ensuring the function remains functional even for a long input.

@Ktakuya332C Ktakuya332C requested a review from a team November 14, 2025 07:52
@Ktakuya332C Ktakuya332C marked this pull request as ready for review November 14, 2025 07:52
Copy link
Collaborator

@junya-takayama junya-takayama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@junya-takayama junya-takayama merged commit 263396e into main Nov 14, 2025
16 of 21 checks passed
@junya-takayama junya-takayama deleted the fix/load-jinja2-template branch November 14, 2025 15:35
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.

3 participants