Skip to content
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

ponysay: fix SyntaxWarning #357413

Merged
merged 1 commit into from
Nov 29, 2024
Merged

Conversation

noamraph
Copy link
Contributor

Currently when running ponysay, you get this warning twice:

/nix/store/.../bin/ponysay/balloon.py:43: SyntaxWarning: invalid escape sequence '\-'

It is caused by a docstring containing twice the phrase \-directional.

The fix is just to make it a raw string (replace ''' with r''').

I created this PR: erkin/ponysay#322. However, the last commit was a year ago, so I don't expect a quick reply.

To test, I just run:

nix run .#ponysay hello

and don't see the warnings.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Currently when running ponysay, you get this warning twice:

```
/nix/store/.../bin/ponysay/balloon.py:43: SyntaxWarning: invalid escape sequence '\-'
```

It is caused by a docstring containing twice the phrase `\-directional`.

The fix is just to make it a raw string (replace `'''` with `r'''`).
@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Nov 19, 2024
@ofborg ofborg bot requested a review from bodil November 20, 2024 17:27
@Aleksanaa Aleksanaa added the backport release-24.11 Backport PR automatically label Nov 29, 2024
@Aleksanaa Aleksanaa merged commit 1f197e6 into NixOS:master Nov 29, 2024
32 of 33 checks passed
Copy link
Contributor

Successfully created backport PR for release-24.11:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants