Open Tonyl314 opened 1 year ago
I will ask for anyother that want to comment to comment, but i see no issue if this is more compliant to ANSI than what we have
So the only thing remaining is updating the CHANGELOG and related stuff (changelog from the manuals/ponysay.texinfo aroung line 3413)
@JotaRandom Should I update it? Which of the fixes should appear there?
I don't agree with the fix. You should use multiline strings with the r prefix (raw):
r"""
@param link:str The \-directional balloon line character
"""
That way the docstring stays intact.
@Tonyl314 Can I ask you to look at @maclermo suggestion and amend the CHANGELOG as @JotaRandom requested. The syntax warning is really annoying on 3.12 python
I switched to using a raw docstring as @maclermo suggested and updated the changelog. Is there anything else left to do?
merge?
still seeing the invalid sequence warning.
ponysay 3.0.3
python 3.12.4
the warning appears for every ponysay option
@SamuelCano03 Are you getting the exact same warning as in #314? Does it also appear when you run src/balloon.py directly?
@SamuelCano03 Are you getting the exact same warning as in #314? Does it also appear when you run src/balloon.py directly?
➜ ~ ponysay hi
/usr/bin/ponysay/balloon.py:43: SyntaxWarning: invalid escape sequence '\-'
/usr/bin/ponysay/balloon.py:43: SyntaxWarning: invalid escape sequence '\-'
Althoug it says warning on /usr/bin/ponysay/balloon.py, i dont have that .py file. I only have on /usr/bin/ a binary called ponysay. I've installed ponysay with pacman and yay (I've tried with both). Is it bad that i don't have the balloon.py? I've just tried installing ponysay-git, it didn't work. OS: Arch Linux x86_64
@SamuelCano03 Oh, then you don't have my fork. The fix hasn't been merged yet, so it's only available here (needs to be built from source).
@Tonyl314 sorry for silly question. Does it mean that at the moment the solution is installing from source from your fork? later will be available on pacman/apt repositories?
@SamuelCano03 Yup! You would need to uninstall the Arch package, download the source code from the fork and run setup.py
.
Hopefully someone can merge this soon so that the fix is easier to access…
sudo merge
I have fixed three things:
Default ANSI code Ponysay was using the "21" ANSI code to reset boldness; however, this functionality does not seem to be widely supported (see this gist or this answer). On my terminal, for example, it serves as double-underline, leading to a very ugly help message. For this reason, I have replaced the code with a "0", as that is a universal reset.
Fix --restrict There was an unmatched bracket in a pony's metadata which led to the "metadata" file not being created on setup. This fixes issue #266, making the --restrict option work again.
Backslash escaping There was an instance of a docstring using unescaped backslashes, which in turn threw Python warnings.