Skip to content

Fix plugin loading type annotations and improve code readability#4524

Open
hariomphulre wants to merge 1 commit intoarchlinux:masterfrom
hariomphulre:fix-3021-plugin
Open

Fix plugin loading type annotations and improve code readability#4524
hariomphulre wants to merge 1 commit intoarchlinux:masterfrom
hariomphulre:fix-3021-plugin

Conversation

@hariomphulre
Copy link
Copy Markdown

Fix: Plugin loading with URL support

Issue: Plugin loading failed when using remote URLs due to Path normalization

Changes:

  1. args.py: Pass plugin argument as string to preserve URL format
  2. plugins.py:
    • Added urllib.error import for proper error handling
    • Updated _localize_path() to accept str | Path
    • Improved URL filename extraction using os.path.basename()
    • Added try-except for URL download errors
    • Updated load_plugin() to accept str | Path
    • Preserve URL strings throughout to avoid Path normalization

Impact:

  • Users can now load plugins from remote URLs (https://, http://)
  • Better error messages when downloads fail
  • Cleaner separation between string URLs and filesystem paths

@codefiles

@hariomphulre hariomphulre requested a review from Torxed as a code owner May 6, 2026 21:30
@hariomphulre
Copy link
Copy Markdown
Author

Hello, anyone can review it plz... @svartkanin @codefiles @Torxed

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.

1 participant