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

Markup does not fail on missing placeholder #225

Closed
mart-e opened this issue Jun 11, 2021 · 0 comments · Fixed by #224
Closed

Markup does not fail on missing placeholder #225

mart-e opened this issue Jun 11, 2021 · 0 comments · Fixed by #224
Milestone

Comments

@mart-e
Copy link
Contributor

mart-e commented Jun 11, 2021

In the scenario of a missing single placeholder, the mod operator did
not fail as it does when having multiple placeholder

How to reproduce:

>>> Markup("foo") % 42
Markup("foo")
>>> Markup("foo") % (42, 43)
TypeError: not all arguments converted during string formatting
>>> Markup("foo") % (42,)
TypeError: not all arguments converted during string formatting

Expected behavior:
Fail on the three code snippets, as when using native strings.

Environment:

  • Python version: 3.9.5
  • MarkupSafe version: 1.1.0
@davidism davidism added this to the 2.1.0 milestone Jun 11, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants