Skip to content

Commit 14da059

Browse files
authored
Run linting on pysetup directory (#4335)
1 parent ad88450 commit 14da059

File tree

18 files changed

+290
-186
lines changed

18 files changed

+290
-186
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ MARKDOWN_FILES = $(CURDIR)/README.md \
186186
lint: pyspec
187187
@$(MDFORMAT_VENV) --number --wrap=80 $(MARKDOWN_FILES)
188188
@$(CODESPELL_VENV) . --skip "./.git,$(VENV),$(PYSPEC_DIR)/.mypy_cache" -I .codespell-whitelist
189-
@$(PYTHON_VENV) -m isort --quiet $(CURDIR)/tests
190-
@$(PYTHON_VENV) -m black --quiet $(CURDIR)/tests
189+
@$(PYTHON_VENV) -m isort --quiet $(CURDIR)/tests $(CURDIR)/pysetup
190+
@$(PYTHON_VENV) -m black --quiet $(CURDIR)/tests $(CURDIR)/pysetup
191191
@$(PYTHON_VENV) -m pylint --rcfile $(PYLINT_CONFIG) $(PYLINT_SCOPE)
192192
@$(PYTHON_VENV) -m mypy --config-file $(MYPY_CONFIG) $(MYPY_SCOPE)
193193

pysetup/constants.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# Definitions in context.py
2-
PHASE0 = 'phase0'
3-
ALTAIR = 'altair'
4-
BELLATRIX = 'bellatrix'
5-
CAPELLA = 'capella'
6-
DENEB = 'deneb'
7-
ELECTRA = 'electra'
8-
FULU = 'fulu'
9-
EIP6800 = 'eip6800'
10-
EIP7441 = 'eip7441'
11-
EIP7732 = 'eip7732'
12-
EIP7805 = 'eip7805'
2+
PHASE0 = "phase0"
3+
ALTAIR = "altair"
4+
BELLATRIX = "bellatrix"
5+
CAPELLA = "capella"
6+
DENEB = "deneb"
7+
ELECTRA = "electra"
8+
FULU = "fulu"
9+
EIP6800 = "eip6800"
10+
EIP7441 = "eip7441"
11+
EIP7732 = "eip7732"
12+
EIP7805 = "eip7805"
1313

1414

1515
# The helper functions that are used when defining constants
16-
CONSTANT_DEP_SUNDRY_CONSTANTS_FUNCTIONS = '''
16+
CONSTANT_DEP_SUNDRY_CONSTANTS_FUNCTIONS = """
1717
def ceillog2(x: int) -> uint64:
1818
if x < 1:
1919
raise ValueError(f"ceillog2 accepts only positive values, x={x}")
@@ -24,10 +24,10 @@ def floorlog2(x: int) -> uint64:
2424
if x < 1:
2525
raise ValueError(f"floorlog2 accepts only positive values, x={x}")
2626
return uint64(x.bit_length() - 1)
27-
'''
27+
"""
2828

2929

30-
OPTIMIZED_BLS_AGGREGATE_PUBKEYS = '''
30+
OPTIMIZED_BLS_AGGREGATE_PUBKEYS = """
3131
def eth_aggregate_pubkeys(pubkeys: Sequence[BLSPubkey]) -> BLSPubkey:
3232
return bls.AggregatePKs(pubkeys)
33-
'''
33+
"""

0 commit comments

Comments
 (0)