[fix] String started with at was interpreted as option#380
Open
zamentur wants to merge 5 commits into
Open
Conversation
tituspijean
reviewed
Jun 25, 2026
Co-authored-by: tituspijean <tituspijean@yunohost.org>
alexAubin
reviewed
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
Text related to an API option and starting with an at are interpreted as options and not as values !
Related issues: YunoHost/issues#2557
The solution
It's an argparse bug python/cpython#138950
Some comments suggest to use the equal notation but it doesn't work for positional arguments...
SO i found a dirty workaround cause no easy way to escape the value exists (doesn't really make sens in the usual context of argparse i guess...). I add a space at the beggining of the string and remove it just at the end of the wrapper function.
AI transparency: no AI used
PR Status
Tested manually
Code TODOs
seems ready
Tests TODOs
Indicate here tests you have already done, and tests you think should be done
How to test