From 5664412cb7d8e3a042369b021c1812e15010795f Mon Sep 17 00:00:00 2001 From: Marcos Alano Date: Sat, 26 Apr 2025 07:34:03 -0300 Subject: [PATCH] Add xdg_mime module (#10007) * Add version of xdg_mime module * Fix xdg_mime_get since the command is different * Add query parameter * Fix order of parameters * Add myself to BOTMETA * Add unit tests * Fix the way we deal when there is no handler set * Improve documentation * Remove unused import * Fix documentation * Strip xdg-mime from version string * Fix information about version * Add error message sample * Add test to invalid handler * Add support to multiple mime-types * Change the output parameter from handlers to handler * Change tests related to multiple mime-type support * Small fixes * Stop using constant to enable changed state * Add before_handlers and after_handlers * Change tests to use before and after structures * Add a stronger message about using a non-installed handler * Manage some edge cases * Change error message to match the new value * Add some fixes * Change some tests * Update plugins/modules/xdg_mime.py Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Remove a blank line * Remove single quote * Add xdg-mime to the version in the mocks * Remove after_handlers and make code simpler * Update tests to work without after_handlers * Remove diff_params and clean output_params * Make mime_type plural since it supports multiple items * Move the handler check to module init * Use anchors in the test to make yaml simpler * Update plugins/modules/xdg_mime.py Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Update plugins/modules/xdg_mime.py Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Update plugins/modules/xdg_mime.py Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Update plugins/modules/xdg_mime.py Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Update plugins/modules/xdg_mime.py Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Update plugins/modules/xdg_mime.py Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Update plugins/modules/xdg_mime.py Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Update plugins/modules/xdg_mime.py Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Update plugins/modules/xdg_mime.py Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Update plugins/modules/xdg_mime.py Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Add blank line to separe examples * Update plugins/modules/xdg_mime.py Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Add a small homage to my late grandma * Update plugins/modules/xdg_mime.py Co-authored-by: Felix Fontein * Fix pep8 problem with the homage * Remove trailing whitespace * Update plugins/modules/xdg_mime.py Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --------- Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> Co-authored-by: Felix Fontein --- .github/BOTMETA.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/BOTMETA.yml b/.github/BOTMETA.yml index 2e463be4e2..ff070c69a4 100644 --- a/.github/BOTMETA.yml +++ b/.github/BOTMETA.yml @@ -1419,6 +1419,8 @@ files: maintainers: mhalano $modules/xen_orchestra_instance.py: maintainers: shinuza + $modules/xdg_mime.py: + maintainers: mhalano $modules/xenserver_: maintainers: bvitnik $modules/xenserver_facts.py: