-
-
Notifications
You must be signed in to change notification settings - Fork 375
fix bitmap_from_file method in utils.py #2700
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
Conversation
Unable to perform a code review. You have run out of credits 😔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Fix explicit UriKind
usage in bitmap_from_file
to ensure proper BitmapImage.UriSource
initialization.
- Imported
Uri
andUriKind
frompyrevit.framework
- Updated
bitmap.UriSource
assignment to useUri.TryCreate
withUriKind.RelativeOrAbsolute
Comments suppressed due to low confidence (1)
pyrevitlib/pyrevit/forms/utils.py:11
- The docstring states
absolute path
, butUriKind.RelativeOrAbsolute
allows 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! |
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:
Related Issues
If applicable, link the issues resolved by this pull request: