fix bitmap_from_file method in utils.py#2700
Conversation
|
Unable to perform a code review. You have run out of credits 😔 |
There was a problem hiding this comment.
Pull Request Overview
Fix explicit UriKind usage in bitmap_from_file to ensure proper BitmapImage.UriSource initialization.
- Imported
UriandUriKindfrompyrevit.framework - Updated
bitmap.UriSourceassignment to useUri.TryCreatewithUriKind.RelativeOrAbsolute
Comments suppressed due to low confidence (1)
pyrevitlib/pyrevit/forms/utils.py:11
- The docstring states
absolute path, butUriKind.RelativeOrAbsoluteallows relative paths. Update the description to reflect support for both, or enforce only absolute URIs.
bitmap_file (str): absolute path to bitmap file
|
@jmcouffin what do the emojis mean? |
If you mean this one ☝️ The other ones on your original post, not much more than thanks, I will look at it and test whenever I get the time. |
add error handling for Uri.TryCreate in bitmap_from_file method Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Thanks @jaredholloway94. |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25162+1306-wip |
trying! |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25162+2030-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25164+0700-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25164+1347-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25164+1420-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25164+1830-wip |
|
📦 New work-in-progress (wip) builds are available for 5.1.0.25171+0757-wip |
|
📦 New work-in-progress (wip) builds are available for 5.2.0.25181+1313-wip |
|
📦 New public release are available for 5.2.0.25181+1425 |
Fix bitmap_from_file method in utils.py
Description
Explicitly provide UriKind to Uri constructor in bitmap_from_file method.
Checklist
Before submitting your pull request, ensure the following requirements are met:
pipenv run black {source_file_or_directory}Related Issues
If applicable, link the issues resolved by this pull request: