Skip to content

Commit ca781a5

Browse files
authored
Merge pull request #59 from spencer-tb/tox-naming-convention
Additional Tox Checks: pep8-naming and fname8 for correct python naming conventions
2 parents 939334c + 1184399 commit ca781a5

File tree

3 files changed

+26
-21
lines changed

3 files changed

+26
-21
lines changed

setup.cfg

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,27 +51,32 @@ lint =
5151
black==22.3.0; implementation_name == "cpython"
5252
flake8-spellcheck>=0.24,<0.25
5353
flake8-docstrings>=1.6,<2
54-
flake8>=3.9,<4
54+
flake8>=5,<=6
55+
pep8-naming==0.13.3
56+
fname8>=0.0.3
5557

5658
[flake8]
5759
dictionaries=en_US,python,technical
5860
docstring-convention = all
59-
extend-ignore =
60-
E203 # Ignore: Whitespace before ':'
61-
D107 # Ignore: Missing docstring in __init__
62-
D200 # Ignore: One-line docstring should fit on one line with quotes
63-
D203 # Ignore: 1 blank line required before class docstring
64-
D205 # Ignore: blank line required between summary line and description
65-
D212 # Ignore: Multi-line docstring summary should start at the first line
66-
D400 # Ignore: First line should end with a period
67-
D401 # Ignore: First line should be in imperative mood
68-
D410 # Ignore: Missing blank line after section
69-
D411 # Ignore: Missing blank line before section
70-
D412 # Ignore: No blank lines allowed between a section header and its content
71-
D413 # Ignore: Missing blank line after last section
72-
D414 # Ignore: Section has no content
73-
D415 # Ignore: First line should end with a period, question mark, or exclamation point
74-
D416 # Ignore: Section name should end with a colon
61+
extend-ignore = E203, D107, D200, D203, D205,
62+
D212, D400, D401, D410, D411, D412, D413,
63+
D414, D415, D416, N806
64+
# Ignore E203: Whitespace before ':'
65+
# Ignore D107: Missing docstring in __init__
66+
# Ignore D200: One-line docstring should fit on one line with quotes
67+
# Ignore D203: 1 blank line required before class docstring
68+
# Ignore D205: blank line required between summary line and description
69+
# Ignore D212: Multi-line docstring summary should start at the first line
70+
# Ignore D400: First line should end with a period
71+
# Ignore D401: First line should be in imperative mood
72+
# Ignore D410: Missing blank line after section
73+
# Ignore D411: Missing blank line before section
74+
# Ignore D412: No blank lines allowed between a section header and its content
75+
# Ignore D413: Missing blank line after last section
76+
# Ignore D414: Section has no content
77+
# Ignore D415: First line should end with a period, question mark, or exclamation point
78+
# Ignore D416: Section name should end with a colon
79+
# Ignore N806: Variable names with all caps (ALL_CAPS)
7580
per-file-ignore =
7681
tests/evm_transition_tool/test_evaluate.py:E501
7782

src/evm_block_builder/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def build(
2424
withdrawals: Optional[Any] = None,
2525
clique: Optional[Any] = None,
2626
ethash: bool = False,
27-
ethashMode: str = "normal",
27+
ethash_mode: str = "normal",
2828
) -> Tuple[str, str]:
2929
"""
3030
Build a block with specified parameters and return RLP and hash
@@ -68,7 +68,7 @@ def build(
6868
withdrawals: Optional[Any] = None,
6969
clique: Optional[Any] = None,
7070
ethash: bool = False,
71-
ethashMode: str = "normal",
71+
ethash_mode: str = "normal",
7272
) -> Tuple[str, str]:
7373
"""
7474
Executes `evm b11r` with the specified arguments.
@@ -85,7 +85,7 @@ def build(
8585

8686
if ethash:
8787
args.append("--seal.ethash")
88-
args.append("--seal.ethash.mode=" + ethashMode)
88+
args.append("--seal.ethash.mode=" + ethash_mode)
8989

9090
stdin = {
9191
"header": header,
@@ -118,7 +118,6 @@ def version(self) -> str:
118118
Gets `evm` binary version.
119119
"""
120120
if self.cached_version is None:
121-
122121
result = subprocess.run(
123122
[str(self.binary), "-v"],
124123
stdout=subprocess.PIPE,

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ extras =
66
test
77
lint
88
commands =
9+
fname8 src fillers
910
isort src fillers setup.py --check --diff
1011
black src fillers setup.py --check --diff
1112
flake8 src fillers setup.py

0 commit comments

Comments
 (0)