From 4480bb814db0c5242492eb47f3fd0ec6522ffb20 Mon Sep 17 00:00:00 2001 From: Leo Singer Date: Wed, 5 Apr 2023 09:56:47 -0400 Subject: [PATCH 1/2] Use flake8 directly instead of through pytest-flake8 pytest-flake8 is failing due to tholo/pytest-flake8#88. --- .github/workflows/build-and-test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index a9d4498..cddf636 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -23,12 +23,15 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - pip install pytest-flake8 pytest-cov + pip install flake8 pytest-cov + - name: Lint + run: | + flake8 . - name: Build run: | pip install -e . - name: Test run: | - pytest --flake8 --cov --cov-report=xml + pytest --cov --cov-report=xml - name: Upload coverage to codecov uses: codecov/codecov-action@v3 From 4a3db3b9e7374294063ed81149ad6e06982d1acf Mon Sep 17 00:00:00 2001 From: Leo Singer Date: Wed, 5 Apr 2023 09:59:50 -0400 Subject: [PATCH 2/2] Fix flake8 error --- gcn/voeventclient.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcn/voeventclient.py b/gcn/voeventclient.py index 0e42b5b..33d2753 100644 --- a/gcn/voeventclient.py +++ b/gcn/voeventclient.py @@ -138,9 +138,9 @@ def _form_response(role, origin, response, timestamp): def _ingest_packet(sock, ivorn, handler, log): - """Ingest one VOEvent Transport Protocol packet and act on it, first sending - the appropriate response and then calling the handler if the payload is a - VOEvent.""" + """Ingest one VOEvent Transport Protocol packet and act on it, first + sending the appropriate response and then calling the handler if the + payload is a VOEvent.""" # Receive payload payload = _recv_packet(sock) log.debug("received packet of %d bytes", len(payload))