Skip to content

Commit f895ce7

Browse files
committed
update version python-ulid and lint
1 parent 78b73b2 commit f895ce7

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ redis = ">=3.5.3,<7.0.0"
4141
pydantic = ">=2.0.0,<3.0.0"
4242
click = "^8.0.1"
4343
types-redis = ">=3.5.9,<5.0.0"
44-
python-ulid = "^1.0.3"
44+
python-ulid = ">=1.0.3, <=3.1.0"
4545
typing-extensions = "^4.4.0"
4646
hiredis = ">=2.2.3,<4.0.0"
4747
more-itertools = ">=8.14,<11.0"

tests/test_json_model.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,7 +1528,9 @@ class Product(JsonModel, index=True):
15281528
name: str = Field(index=True, sortable=True) # TAG field with sortable
15291529
category: str = Field(index=True, sortable=True) # TAG field with sortable
15301530
price: int = Field(index=True, sortable=True) # NUMERIC field with sortable
1531-
tags: List[str] = Field(index=True, sortable=True) # TAG field (list) with sortable
1531+
tags: List[str] = Field(
1532+
index=True, sortable=True
1533+
) # TAG field (list) with sortable
15321534

15331535
class Meta:
15341536
global_key_prefix = key_prefix
@@ -1543,9 +1545,13 @@ class Meta:
15431545
await Migrator().run()
15441546

15451547
# Create test data
1546-
product1 = Product(name="Zebra", category="Animals", price=100, tags=["wild", "africa"])
1548+
product1 = Product(
1549+
name="Zebra", category="Animals", price=100, tags=["wild", "africa"]
1550+
)
15471551
product2 = Product(name="Apple", category="Fruits", price=50, tags=["red", "sweet"])
1548-
product3 = Product(name="Banana", category="Fruits", price=30, tags=["yellow", "sweet"])
1552+
product3 = Product(
1553+
name="Banana", category="Fruits", price=30, tags=["yellow", "sweet"]
1554+
)
15491555

15501556
await product1.save()
15511557
await product2.save()

0 commit comments

Comments
 (0)