Skip to content

Commit 129e57c

Browse files
committed
fix: typing
1 parent e5e141b commit 129e57c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/ethereum_test_checklists/eip_checklist.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ def camel_to_snake(name: str) -> str:
1616
class ChecklistItemMeta(type):
1717
"""Metaclass for checklist items that provides string representation."""
1818

19+
_path: str = ""
20+
_override_name: str = ""
21+
1922
def __new__(mcs, name: str, bases: tuple, namespace: dict, **kwargs):
2023
"""Create a new class with the parent path set."""
2124
parent_path = kwargs.get("parent_path", "")
@@ -39,6 +42,7 @@ def __new__(mcs, name: str, bases: tuple, namespace: dict, **kwargs):
3942
for attr_name, attr_value in namespace.items():
4043
if isinstance(attr_value, type) and not attr_name.startswith("_"):
4144
# Create a new class with the parent path set
45+
assert isinstance(attr_value, ChecklistItemMeta)
4246
nested_cls = ChecklistItemMeta(
4347
attr_value.__name__,
4448
attr_value.__bases__,
@@ -62,10 +66,7 @@ def __repr__(cls) -> str:
6266
class ChecklistItem(metaclass=ChecklistItemMeta):
6367
"""Base class for checklist items."""
6468

65-
_path: str = ""
66-
_override_name: str = ""
67-
68-
def __new__(cls, *args, **kwargs) -> pytest.MarkDecorator:
69+
def __new__(cls, *args, **kwargs) -> pytest.MarkDecorator: # type: ignore
6970
"""Return a pytest mark decorator for the checklist item."""
7071
return pytest.mark.eip_checklist(cls._path, *args, **kwargs)
7172

0 commit comments

Comments
 (0)