Skip to content

Commit 7a6aff0

Browse files
committed
fix(pytest): fix spec_version_checker args again
1 parent d8dca1c commit 7a6aff0

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/pytest_plugins/spec_version_checker/spec_version_checker.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -141,22 +141,19 @@ class EIPSpecTestItem(Item):
141141
module: ModuleType
142142
github_token: Optional[str]
143143

144-
def __init__(
145-
self, name: str, parent: Module, module: ModuleType, github_token: Optional[str] = None
146-
):
144+
def __init__(self, name: str, parent: Node, **kwargs: Any):
147145
"""
148146
Initialize the test item.
149147
150148
Args:
151149
name: Name of the test
152150
parent: Parent node
153-
module: Module to test
154-
github_token: Optional GitHub token for API authentication
151+
**kwargs: Additional keyword arguments
155152
156153
"""
157154
super().__init__(name, parent)
158-
self.module = module
159-
self.github_token = github_token
155+
self.module = None # type: ignore
156+
self.github_token = None
160157

161158
@classmethod
162159
def from_parent(cls, parent: Node, **kw: Any) -> "EIPSpecTestItem":
@@ -172,13 +169,11 @@ def from_parent(cls, parent: Node, **kw: Any) -> "EIPSpecTestItem":
172169
module = kw.pop("module", None)
173170
github_token = kw.pop("github_token", None)
174171

175-
# Call the parent class's from_parent with just the required args
176-
item = super().from_parent(parent=parent, name="test_eip_spec_version")
172+
kw["name"] = "test_eip_spec_version"
173+
item = super(EIPSpecTestItem, cls).from_parent(parent, **kw)
177174

178-
# Set the additional attributes after creation
179175
item.module = module
180176
item.github_token = github_token
181-
182177
return item
183178

184179
def runtest(self) -> None:

0 commit comments

Comments
 (0)