Skip to content

Commit 2f4619e

Browse files
committed
v2.1.1 Fix improper generic setup for mypy #51
1 parent 3430603 commit 2f4619e

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,4 @@ venv.bak/
115115
.rss-parser
116116
.ruff_cache
117117
.python-version
118+
.DS_Store

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "rss-parser"
3-
version = "2.1.0"
3+
version = "2.1.1"
44
description = "Typed pythonic RSS/Atom parser"
55
authors = ["dhvcc <[email protected]>"]
66
license = "GPL-3.0"

rss_parser/models/types/only_list.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
from typing import Union
1+
from typing import Generic, TypeVar, Union
22

33
from rss_parser.pydantic_proxy import import_v1_pydantic
44

55
pydantic_validators = import_v1_pydantic(".validators")
6+
pydantic_generics = import_v1_pydantic(".generics")
67

8+
T = TypeVar("T")
79

8-
class OnlyList(list):
10+
11+
class OnlyList(pydantic_generics.GenericModel, Generic[T], list):
912
@classmethod
1013
def __get_validators__(cls):
1114
yield cls.validate

0 commit comments

Comments
 (0)