Fixed linting issues

- re-enabled lint checks
This commit is contained in:
Madhava Jay 2022-05-24 11:42:53 +10:00
parent fc617142c0
commit 9c4f80ad21
2 changed files with 6 additions and 4 deletions

View file

@ -32,8 +32,8 @@ jobs:
- name: Lint with flake8 and check black
run: |
pip install black flake8
# flake8 . --filename '*.py,*.pyx,*.pxd' --count --show-source --statistics --exclude benchmark,build,capnp/templates/module.pyx
# flake8 . --count --show-source --statistics --exclude benchmark,build
flake8 . --filename '*.py,*.pyx,*.pxd' --count --show-source --statistics --exclude benchmark,build,capnp/templates/module.pyx
flake8 . --count --show-source --statistics --exclude benchmark,build
black . --check --diff --color
- name: Packaging
run: |

View file

@ -99,7 +99,7 @@ def test_roundtrip_bytes_buffer(all_types):
def test_roundtrip_bytes_fail(all_types):
with pytest.raises(TypeError):
with all_types.TestAllTypes.from_bytes(42) as msg:
with all_types.TestAllTypes.from_bytes(42) as _:
pass
@ -238,7 +238,9 @@ def test_from_bytes_traversal_limit(all_types):
for i in range(0, size):
msg.structList[i].uInt8Field == 0
with all_types.TestAllTypes.from_bytes(data, traversal_limit_in_words=2 ** 62) as msg:
with all_types.TestAllTypes.from_bytes(
data, traversal_limit_in_words=2**62
) as msg:
for i in range(0, size):
assert msg.structList[i].uInt8Field == 0