From 9c4f80ad214fc23399a21acc25102a455f4bd61f Mon Sep 17 00:00:00 2001 From: Madhava Jay Date: Tue, 24 May 2022 11:42:53 +1000 Subject: [PATCH] Fixed linting issues - re-enabled lint checks --- .github/workflows/packagingtest.yml | 4 ++-- test/test_serialization.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/packagingtest.yml b/.github/workflows/packagingtest.yml index 9429a03..e6aea66 100644 --- a/.github/workflows/packagingtest.yml +++ b/.github/workflows/packagingtest.yml @@ -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: | diff --git a/test/test_serialization.py b/test/test_serialization.py index 09e1278..bc3a428 100644 --- a/test/test_serialization.py +++ b/test/test_serialization.py @@ -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