diff --git a/.github/workflows/generate_vectors.yml b/.github/workflows/generate_vectors.yml index 31ffa847b0..460bf503af 100644 --- a/.github/workflows/generate_vectors.yml +++ b/.github/workflows/generate_vectors.yml @@ -2,7 +2,7 @@ name: Run test vector generation defaults: run: - shell: zsh {0} + shell: zsh -e {0} on: workflow_dispatch: diff --git a/.github/workflows/nightly-tests.yml b/.github/workflows/nightly-tests.yml index 4fa36fe033..c8b374e592 100644 --- a/.github/workflows/nightly-tests.yml +++ b/.github/workflows/nightly-tests.yml @@ -2,7 +2,7 @@ name: Nightly mainnet tests defaults: run: - shell: zsh {0} + shell: zsh -e {0} on: workflow_dispatch: diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index a8c2946f1d..05dee400ea 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -2,7 +2,7 @@ name: Run tests defaults: run: - shell: zsh {0} + shell: zsh -e {0} on: push: diff --git a/pysetup/md_to_spec.py b/pysetup/md_to_spec.py index 3154e7716b..5d865b4e5d 100644 --- a/pysetup/md_to_spec.py +++ b/pysetup/md_to_spec.py @@ -119,7 +119,7 @@ def _process_code_block(self, code_block: FencedCode) -> None: source = _get_source_from_code_block(code_block) module = ast.parse(source) - # AST element for each top level defintion of the module + # AST element for each top level definition of the module for element in module.body: element_source = ast.unparse(element) clean_source = "\n".join(line.rstrip() for line in element_source.splitlines()) diff --git a/specs/_features/eip7805/fork-choice.md b/specs/_features/eip7805/fork-choice.md index 951c04c8c9..1029165aab 100644 --- a/specs/_features/eip7805/fork-choice.md +++ b/specs/_features/eip7805/fork-choice.md @@ -91,7 +91,7 @@ def get_forkchoice_store(anchor_state: BeaconState, anchor_block: BeaconBlock) - #### New `validate_inclusion_lists` ```python -def validate_inclusion_lists(store: Store, +def validate_inclusion_lists(_store: Store, inclusion_list_transactions: Sequence[Transaction], execution_payload: ExecutionPayload) -> None: """ @@ -99,8 +99,6 @@ def validate_inclusion_lists(store: Store, when all transactions are present in payload or when any missing transactions are found to be invalid when appended to the end of the payload unless the block is full. """ - # pylint: disable=unused-argument - # Verify inclusion list transactions are present in the execution payload contains_all_txs = all(tx in execution_payload.transactions for tx in inclusion_list_transactions) if contains_all_txs: diff --git a/specs/altair/light-client/sync-protocol.md b/specs/altair/light-client/sync-protocol.md index 3feddcbf02..6fecc2169d 100644 --- a/specs/altair/light-client/sync-protocol.md +++ b/specs/altair/light-client/sync-protocol.md @@ -176,32 +176,28 @@ class LightClientStore(object): ### `finalized_root_gindex_at_slot` ```python -def finalized_root_gindex_at_slot(slot: Slot) -> GeneralizedIndex: - # pylint: disable=unused-argument +def finalized_root_gindex_at_slot(_slot: Slot) -> GeneralizedIndex: return FINALIZED_ROOT_GINDEX ``` ### `current_sync_committee_gindex_at_slot` ```python -def current_sync_committee_gindex_at_slot(slot: Slot) -> GeneralizedIndex: - # pylint: disable=unused-argument +def current_sync_committee_gindex_at_slot(_slot: Slot) -> GeneralizedIndex: return CURRENT_SYNC_COMMITTEE_GINDEX ``` ### `next_sync_committee_gindex_at_slot` ```python -def next_sync_committee_gindex_at_slot(slot: Slot) -> GeneralizedIndex: - # pylint: disable=unused-argument +def next_sync_committee_gindex_at_slot(_slot: Slot) -> GeneralizedIndex: return NEXT_SYNC_COMMITTEE_GINDEX ``` ### `is_valid_light_client_header` ```python -def is_valid_light_client_header(header: LightClientHeader) -> bool: - # pylint: disable=unused-argument +def is_valid_light_client_header(_header: LightClientHeader) -> bool: return True ``` diff --git a/specs/deneb/polynomial-commitments.md b/specs/deneb/polynomial-commitments.md index 1ab84cad9d..ece37a9307 100644 --- a/specs/deneb/polynomial-commitments.md +++ b/specs/deneb/polynomial-commitments.md @@ -158,9 +158,8 @@ This function performs a multi-scalar multiplication between `points` and `integers`. `points` can either be in G1 or G2. ```python -def multi_exp(points: Sequence[TPoint], - integers: Sequence[uint64]) -> Sequence[TPoint]: - # pylint: disable=unused-argument +def multi_exp(_points: Sequence[TPoint], + _integers: Sequence[uint64]) -> Sequence[TPoint]: ... ``` diff --git a/specs/phase0/beacon-chain.md b/specs/phase0/beacon-chain.md index 01a2979337..b8c41e350c 100644 --- a/specs/phase0/beacon-chain.md +++ b/specs/phase0/beacon-chain.md @@ -1396,7 +1396,7 @@ def get_matching_head_attestations(state: BeaconState, epoch: Epoch) -> Sequence ```python def get_unslashed_attesting_indices(state: BeaconState, attestations: Sequence[PendingAttestation]) -> Set[ValidatorIndex]: - output = set() # type: Set[ValidatorIndex] + output: Set[ValidatorIndex] = set() for a in attestations: output = output.union(get_attesting_indices(state, a)) return set(filter(lambda index: not state.validators[index].slashed, output))