Fix spelling errors found by codespell

This commit is contained in:
Martin Lundfall 2019-12-16 12:55:18 +01:00
parent b09c45ffd2
commit a4f8a77c02
6 changed files with 9 additions and 6 deletions

View File

@ -77,6 +77,9 @@ check_toc: $(MARKDOWN_FILES:=.toc)
diff -q $* $*.tmp && \ diff -q $* $*.tmp && \
rm $*.tmp rm $*.tmp
codespell:
! codespell . --skip ./.git | grep -v 'disabled'
lint: $(PY_SPEC_ALL_TARGETS) lint: $(PY_SPEC_ALL_TARGETS)
cd $(PY_SPEC_DIR); . venv/bin/activate; \ cd $(PY_SPEC_DIR); . venv/bin/activate; \
flake8 --ignore=E252,W504,W503 --max-line-length=120 ./eth2spec \ flake8 --ignore=E252,W504,W503 --max-line-length=120 ./eth2spec \

View File

@ -252,7 +252,7 @@ def combine_ssz_objects(old_objects: Dict[str, str], new_objects: Dict[str, str]
return old_objects return old_objects
# inserts are handeled the same way as functions # inserts are handled the same way as functions
combine_inserts = combine_functions combine_inserts = combine_functions

View File

@ -560,7 +560,7 @@ def int_to_bytes(n: uint64, length: uint64) -> bytes:
```python ```python
def bytes_to_int(data: bytes) -> uint64: def bytes_to_int(data: bytes) -> uint64:
""" """
Return the integer deserialization of ``data`` intepreted as ``ENDIANNESS``-endian. Return the integer deserialization of ``data`` interpreted as ``ENDIANNESS``-endian.
""" """
return int.from_bytes(data, ENDIANNESS) return int.from_bytes(data, ENDIANNESS)
``` ```

View File

@ -150,7 +150,7 @@ Template:
Data: Data:
{container name}: Any of the container names listed below (exluding the `(Container)` python super type) {container name}: Any of the container names listed below (excluding the `(Container)` python super type)
``` ```
```python ```python

View File

@ -262,7 +262,7 @@ def test_att1_duplicate_index_normal_signed(spec, state):
indices.pop(1) # remove an index, make room for the additional duplicate index. indices.pop(1) # remove an index, make room for the additional duplicate index.
attester_slashing.attestation_1.attesting_indices = sorted(indices) attester_slashing.attestation_1.attesting_indices = sorted(indices)
# sign it, the signature will be valid for a single occurence. If the transition accidentally ignores the duplicate. # sign it, the signature will be valid for a single occurrence. If the transition accidentally ignores the duplicate.
sign_indexed_attestation(spec, state, attester_slashing.attestation_1) sign_indexed_attestation(spec, state, attester_slashing.attestation_1)
indices.append(indices[0]) # add one of the indices a second time indices.append(indices[0]) # add one of the indices a second time
@ -282,7 +282,7 @@ def test_att2_duplicate_index_normal_signed(spec, state):
indices.pop(2) # remove an index, make room for the additional duplicate index. indices.pop(2) # remove an index, make room for the additional duplicate index.
attester_slashing.attestation_2.attesting_indices = sorted(indices) attester_slashing.attestation_2.attesting_indices = sorted(indices)
# sign it, the signature will be valid for a single occurence. If the transition accidentally ignores the duplicate. # sign it, the signature will be valid for a single occurrence. If the transition accidentally ignores the duplicate.
sign_indexed_attestation(spec, state, attester_slashing.attestation_2) sign_indexed_attestation(spec, state, attester_slashing.attestation_2)
indices.append(indices[1]) # add one of the indices a second time indices.append(indices[1]) # add one of the indices a second time

View File

@ -155,7 +155,7 @@ def test_duplicate_attestation(spec, state):
next_epoch(spec, single_state) next_epoch(spec, single_state)
next_epoch(spec, dup_state) next_epoch(spec, dup_state)
# Run non-duplicate inclusion rewards for comparision. Do not yield test vectors # Run non-duplicate inclusion rewards for comparison. Do not yield test vectors
for _ in run_process_rewards_and_penalties(spec, single_state): for _ in run_process_rewards_and_penalties(spec, single_state):
pass pass