From 575954ca8bfe2dfde9b5f9548fe41e3bba952cee Mon Sep 17 00:00:00 2001 From: James Prior Date: Fri, 14 Mar 2025 11:54:33 +0000 Subject: [PATCH 1/2] Fix docs typos --- docs/filter_reference.md | 14 +++++++------- docs/tag_reference.md | 2 +- liquid2/undefined.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/filter_reference.md b/docs/filter_reference.md index 67913f2..1fc8f8e 100644 --- a/docs/filter_reference.md +++ b/docs/filter_reference.md @@ -1312,7 +1312,7 @@ Return the localized translation of the input message with pluralization. The fi ```liquid2 {% assign count = "Earth,Tatooine" | split: "," | size %} -{{ "Hello, World!" | ngetetxt: "Hello, Worlds!", count }} +{{ "Hello, World!" | ngettext: "Hello, Worlds!", count }} ``` ```plain title="output" @@ -1322,7 +1322,7 @@ Hallo Welten! Any keyword arguments are used to populate message variables. If `user.name` is `"Sue"` and `count` is `1`: ```liquid2 -{{ "Hello, %(you)s" | ngetetxt: "Hello, everyone!", count, you: user.name }} +{{ "Hello, %(you)s" | ngettext: "Hello, everyone!", count, you: user.name }} ``` ```plain title="output" @@ -1334,16 +1334,16 @@ Hallo Sue! -```` +``` | npgettext: , , [, : ... ] -`` +``` Return the localized translation of the input message with pluralization and a message context. The first positional argument is the message context string, the second is the plural form of the message, and the third is a number used to determine if the singular or plural message should be used. ```liquid2 {% assign count = "Earth,Tatooine" | split: "," | size %} -{{ "Hello, World!" | ngetetxt: "extra special greeting", "Hello, Worlds!", count }} -```` +{{ "Hello, World!" | npgettext: "extra special greeting", "Hello, Worlds!", count }} +``` ```plain title="output" Hallo Welten! @@ -1352,7 +1352,7 @@ Hallo Welten! Any keyword arguments are used to populate message variables. If `user.name` is `"Sue"` and `count` is `1`: ```liquid2 -{{ "Hello, %(you)s" | ngetetxt: "extra special greeting", "Hello, everyone!", count, you: user.name }} +{{ "Hello, %(you)s" | npgettext: "extra special greeting", "Hello, everyone!", count, you: user.name }} ``` ```plain title="output" diff --git a/docs/tag_reference.md b/docs/tag_reference.md index 19eeeb9..ad9eae2 100644 --- a/docs/tag_reference.md +++ b/docs/tag_reference.md @@ -593,7 +593,7 @@ Any primitive expression can be tested for truthiness, like `{% if some_variable | `>=` | Greater than or equal to | `user.age >= 18` | | `<=` | Less than or equal to | `basket.size <= 0` | | `and` | Logical and | `x and y` | -| `and` | Logical or | `x or y` | +| `or` | Logical or | `x or y` | | `not` | Logical not | `not x` | ### Operator precedence diff --git a/liquid2/undefined.py b/liquid2/undefined.py index 8e1a533..f10ef6d 100644 --- a/liquid2/undefined.py +++ b/liquid2/undefined.py @@ -76,7 +76,7 @@ def __liquid__(self) -> object: return None def poke(self) -> bool: - """Prod the type, giving it the opertunity to raise an exception.""" + """Prod the type, giving it the opportunity to raise an exception.""" return True From 59651ad428b6d741ea89385e0c66fcf86f36b772 Mon Sep 17 00:00:00 2001 From: James Prior Date: Fri, 14 Mar 2025 12:01:09 +0000 Subject: [PATCH 2/2] Ignore Ruff S704 and TC006 --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 37ecd4f..fcbb2fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -178,6 +178,8 @@ ignore = [ "PLR0915", "SIM108", "PT001", + "S704", + "TC006", ] fixable = ["I"]