-
Notifications
You must be signed in to change notification settings - Fork 373
Labels
A-spec-specsArea: Specification—The Ethereum specification itself (eg. `src/ethereum/*`)Area: Specification—The Ethereum specification itself (eg. `src/ethereum/*`)C-bugCategory: this is a bug, deviation, or other problemCategory: this is a bug, deviation, or other problemE-easyExperience: easy, good for newcomersExperience: easy, good for newcomersP-lowS-needs-attentionStatus: needs attentionStatus: needs attention
Description
Type checkers infer the most specific type they can from an assignment. Because it's routine for us to go from Unscheduled to ByTimestamp, we should annotate FORK_CRITERIA with the supertype to avoid a breaking API change.
For example, this:
execution-specs/src/ethereum/forks/frontier/__init__.py
Lines 5 to 7 in 69364e2
| from ethereum.fork_criteria import ByBlockNumber | |
| FORK_CRITERIA = ByBlockNumber(0) |
Should become:
from ethereum.fork_criteria import ByBlockNumber, ForkCriteria
FORK_CRITERIA: ForkCriteria = ByBlockNumber(0) Metadata
Metadata
Assignees
Labels
A-spec-specsArea: Specification—The Ethereum specification itself (eg. `src/ethereum/*`)Area: Specification—The Ethereum specification itself (eg. `src/ethereum/*`)C-bugCategory: this is a bug, deviation, or other problemCategory: this is a bug, deviation, or other problemE-easyExperience: easy, good for newcomersExperience: easy, good for newcomersP-lowS-needs-attentionStatus: needs attentionStatus: needs attention