We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
parent
1 parent f75461f commit bccc85bCopy full SHA for bccc85b
src/ethereum_test_forks/base_fork.py
@@ -539,6 +539,15 @@ def ignore(cls) -> bool:
539
"""Return whether the fork should be ignored during test generation."""
540
return cls._ignore
541
542
+ @classmethod
543
+ def parent(cls) -> Type["BaseFork"] | None:
544
+ """Return the parent fork."""
545
+ base_class = cls.__bases__[0]
546
+ assert issubclass(base_class, BaseFork)
547
+ if base_class == BaseFork:
548
+ return None
549
+ return base_class
550
+
551
552
# Fork Type
553
Fork = Type[BaseFork]
0 commit comments